Feedback wanted on programming introduction (Python in Windows)

Steven D'Aprano steve at
Fri Oct 30 04:45:30 CET 2009

On Thu, 29 Oct 2009 11:05:11 -0700, Ethan Furman wrote:

> 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__ 

That is incorrect. Changes to the syntax or language semantics are 
*introduced* with __future__, so as to avoid a sudden and disruptive 
backwards incompatible change. If a feature makes it into __future__, it 
is anything but experimental.

There is nothing "non-standard" about features introduced with 
__future__. The only thing that concerns me is that __future__ may be a 
little too advanced for beginners.

> and can change from one release to the next.

Python guarantees that no feature will ever be removed from __future__. 
It may become a no-op, but it will always be there. Note that 3.0 still 
defines nested_scopes, even though that's been standard in the language 
since 2.2:

[steve at sylar ~]$ python3.0
Python 3.0.1 (r301:69556, Apr  2 2009, 00:41:38)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import nested_scopes
>>> import __future__
>>> __future__.nested_scopes
_Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'alpha', 0), 16)

> 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.

I feel safe to claim you are wrong without even checking.


More information about the Python-list mailing list