* Ethan Furman:
Alf P. Steinbach wrote:
* James Harris:
You get way too deep into Python in places (for a beginner's course in
programming). For example, "from now on I’ll always use from
__future__ in any program that uses print."
Sorry, but I think that hiding such concerns is a real disservice.
The disservice is in teaching folks to use non-standard elements, which
is (sort-of) what __future__ is. Changes to the language are
experimented with in __future__ and can change from one release to the
next. If memory serves, the with statement is an example of having
different behavior when it was moved out of __future__ and made a
standard part of the language.
That's a bit of a straw man argument. I used "from __future__" to write
forward-compatible calls of print, so that those examples would not mysteriously
work or not depending on the Python version. I did not use it to access
experimental features.
However, I didn't know then that the language has changed so much in 3.x that it
isn't practical to aim at general forward compatibility or version independence.
And I didn't know until your comment above that some features, apparently, only
exist in __future__ but are not part of the language, subject to change.
Is there a current example?
And, just a suggestion, would it not be better to have a different name for such
experimental (as opposed to future language version) features, e.g. "from
__experimental__", differentiating between forward compatibility in e.g.
production code, and trying out experimental subject-to-change features?
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list