So what's wrong with __future__? (Was Re: Why "from __future__" stinks ...)

Timothy Grant tjg at exceptionalminds.com
Sun Mar 25 20:01:40 EST 2001


On Sun, Mar 25, 2001 at 04:10:47AM -0500, Tim Peters wrote:
> [Huaiyu Zhu]
> > I don't quite see what the complaint about __future__ is really about.
> > So let me try to analyze a little bit.  Maybe this could encourage
> > someone to write a PEP to clarify.
> >
> > What's wrong with import __future__?
> > ...
> 
> Oh, I don't think it's hard to grasp the primary complaint:  it's a hack!
> Nobody in their right mind would *expect* an import statement to have
> profound effects on the syntax and/or semantics of the module containing the
> import, and it's un-Pythonically surprising to abuse import statements this
> way.

I'm glad that it appears that even the Python gods are
implementing this hideous travesty under protest. It is truly
the ugliest hack ever--far worse than lambda, which to some
extent could have been expected.
> 
> OTOH, it was the best hack we could dream up under the constraints that (a)
> we had to dream up *something*; (b) it had to be 100% backward compatible, no
> exceptions no way no how; and, (c) since it was late in the release cycle,
> any form of new syntax was a non-starter (there was no conceivable way to
> make time to adjust all the tools we ship, let alone pull that trick  with
> such scant warning on other people supplying Python tools).

OK, here's where I show my ignorance. Why did it have to be
100% backward compatible? Things in this industry get changed
every day that are not 100% backward compatible. I tend to
think that this was one of Microsoft's biggest problems with
their OS. They insisted on backward compatability. I often
wonder how much long-term pain (crappy OS stability) could have
been avoided if MS had convinced their users to accept a bit of
short term pain when Win95 was introduced.

Heck, I'm still on 1.5.2, but only because I'm lazy. If my code
breaks when 2.1 is the only available version I'll stop being
so lazy and install it. I realize that there are people with
installed bases, it would be a bigger problem, but not bigger
than making a new rpm or deb or tar.gz available.

> 
> It will probably go away by the time 2.2 ships.  In the meantime, it should
> do the job it was designed to do, for the three highly vocal people who are
> afraid of nested_scopes damage they won't actually suffer <0.9 wink>.

I certainly hope so.

-- 
Stand Fast,
    tjg.

Timothy Grant                         tjg at exceptionalminds.com
Chief Technology Officer              www.exceptionalminds.com
HyperLINq Technologies, Inc.          <><       (503) 246-3630
>>>>>>>>>>>>>Linux, because rebooting is *NOT* normal<<<<<<<<<
>>>>This machine was last rebooted:  68 days  4:56 hours ago<<




More information about the Python-list mailing list