New PEP: The directive statement

Piet van Oostrum piet at cs.uu.nl
Thu Mar 22 15:43:29 EST 2001


>>>>> Neil Schemenauer <nas at arctrix.com> (NS) writes:

NS> On Wed, Mar 21, 2001 at 12:18:24PM +0100, piet at cs.uu.nl wrote:
>> It would be much less of a joke when __future__ would be replaced by
>> __features__, I think.

NS> __features__ is a terrible name.  Its pretty obvious that you
NS> (and a lot of other people on this list) don't understand what
NS> __future__ does.

NS> A small hint: pretend you are using 2.2 and want to use nested
NS> scopes.  Will you be using "from __future__ import
NS> nested_scopes"?  What if you are using 2.2 and don't want nested
NS> scopes?

If the suggestion is that after 2.2. you would remove the "from __future__
import ..." then there will be problems. E.g. consider the integer
division. For the transitional releases you would have to add a
future_statement. But if you remove it after the feature has become
standard your new modules that use the new division semantics become
ambiguous. Suppose you have to use Python 1.5.2. or 2.0 because that's all
your ISP provides. And you have this nifty module that someone wrote. How
do you know what the semantics of division is in that module? It would be
much better if the module indicated that it uses the new semantics, for the
ages to come.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list