Why "from __future__" stinks; a counter-offer
John W. Baxter
jwbnews at scandaroon.com
Mon Mar 19 23:45:49 EST 2001
In article <9969ta$2is$1 at newsg3.svr.pol.co.uk>,
Will Newton <will at nospam.misconception.org.uk> wrote:
> Aahz Maruch wrote:
>
> > So far, no other person has actually come up with a scheme that addreses
> > the problem at hand, as opposed to simply whining, suggesting minor and
> > worthless variations, or putting forth even *more* complicated solutions.
> > One of the nice things about this solution is that if it is decided to be
> > an ugly wart, it can be easily dropped for Python 2.2.
>
> How often is this "from __future__" expected to be used?
>
> Just experimental code written for bleeding edge versions of Python or a
> significant portion of code (that will eventually become legacy code)?
>
It seems to be for gentle introduction of changes which are considered
good (a category in which I would file the nested scopes as it is in 2.1
and will be), but which will cause code breakage. If something doesn't
break code, it can go in without the mechanism.
Note that no one ever has to write such an import (although folks will
have to read them)...one can instead elect to wait until the future
feature becomes *the way things are* before using it. (But dropping the
import into existing code long enough to observe breakage in 2.1 would
seem more prudent than waiting...even without making use of the nested
scopes.)
And the from __future__ import xxx has at least the advantage that it
seems to work.
I would expect there will not be scores of those; more like a handful or
two, since the BDFL has made it clear he would rather not break code.
Meanwhile, the
from __future__ import xxx
is presently in use for exactly one feature, with no more on the horizon
for 2.1.
That would seem to leave time for someone(s) who prefer some
alternative(s) to write (a) PEP(s) proposing same...convincing enough
and implementable enough, and such input could make
from __future__ import nested_scopes
the only instance of from __future__.
But I don't think the proponents of something else should wait very
long, and I think they should spend their energy on the (er) future, not
on this instance in this release. Once from __future__ has been used in
a couple of releases, changing it would be harder than it would be now
for 2.2 et seq. I think Tim's description of the from __future__ PEP as
darn near retroactive might enhance the chances of an alternative PEP
displacing it (but not for the nested scopes thing).
--John
--
John W. Baxter Port Ludlow, WA USA jwbnews at scandaroon.com
More information about the Python-list
mailing list