New PEP: The directive statement

Emile van Sebille emile at fenx.com
Fri Mar 23 10:10:06 EST 2001


I don't think the interpreter switch works.  Modules will either depend on
the current or future behavior, so the option needs to be there.

--

Emile van Sebille
emile at fenx.com

---------
"Joshua Marshall" <jmarshal at mathworks.com> wrote in message
news:99fnif$gsq$1 at news.mathworks.com...
> Martin von Loewis <loewis at informatik.hu-berlin.de> wrote:
> > scarblac at pino.selwerd.nl (Remco Gerlich) writes:
>
> >> First the inconsistency: the syntax definition in (C) claims that some
> >> restrictions on the placement of directive may be in place, depending
on
> >> the directive. However, (D) notes that directives must appear as the
first
> >> non-string token in a file, for backwards compatibility. So in
practice,
> >> directive can't be used anywhere in a file.
>
> > That's not inconsistent. There is only one directive defined so far,
> > to activate nested scopes, and it must appear at the top of the file.
> > In some later release of Python, directive will become a proper
> > keyword, at which time introducing directives with less strict
> > placement rules is possible.
>
> Please, no more keywords.  It's unnecessary in this case.
> How about an interpreter switch:
>
>   python -directive nested_scopes fu.py





More information about the Python-list mailing list