Third Draft: Pep for Deprecating Builtins

holger krekel pyth at devel.trillke.net
Tue Apr 30 09:17:20 EDT 2002


On Tue, Apr 30, 2002 at 08:04:01AM -0400, Steve Holden wrote:
> > As it is, we can no longer look at a fragment of code containing a
> > division operator and know what it means without checking version and
> > import declarations (which may appear ANYWHERE in the source).  I
> > frankly find this to be BIZARRE.
> >
> If you're talking about "from __future__ ...", these can only appear before
> any other source lines, and so (bugs notwithstanding) they aren't as
> difficult to detect as you believe. Remember that some imports from
> __future__ modify how the compiler acts, so you can't just switch them on
> and off at random.

from __future__ even modifies what the *parser* accepts. 
It might help to educate us and others to mention - as needed -
the basic way of how python-sourcecode gets processed:

- parsing into an abstract syntax tree (AST)

- compiling the AST into bytecode 

- running/executing the bytecode

Feel free to correct me :-)

Otherwise i second the statements in your posting.

    holger





More information about the Python-list mailing list