New PEP: The directive statement

Bruce Sass bsass at
Thu Mar 22 06:21:50 CET 2001

On Wed, 21 Mar 2001, Huaiyu Zhu wrote:
> With the __future__ PEP, I envision there could also be things like
> from __future__ import nested_scope
> from __experimentatal__ import stackless
> from __optional__ import static_type
> from __mandatory__ import string_methods
[an alternative]
> directive transitional nested_scope
> directive experimentatal stackless
> directive optional static_type
> directive mandatory string_methods
[or whatever]

Why was (something along the lines of)...

except FutureError:
    # compensate for lack of nested scopes
except ExperimentalError:

...and allowing...

    # code that relies on nested scopes
except FutureError:
    # code that does not use nested scopes

...rejected?  [It looks like a natural to me <shrug>...


> IMHO, reusing existing syntax is closer to Python than Perl, which
> introduces new syntax for many things that are only slightly different.

...and seems the most "Pythonic" of all.]

- Bruce

More information about the Python-list mailing list