New PEP: The directive statement
Clark C. Evans
cce at clarkevans.com
Tue Mar 20 14:48:38 EST 2001
On Tue, 20 Mar 2001, Martin von Loewis wrote:
> A directive_statement is a statement of the form
>
> directive_statement: 'directive' NAME [atom] [';'] NEWLINE
>
...
> Introducing 'directive' as a new keyword might cause
> incompatibilities with existing code. Following the guideline in
> [1], in the initial implementation of this specification,
> directive is a new keyword only if it was used in a valid
> directive_statement (i.e. if it appeared as the first non-string
> token in a module).
I'm new to python, but why not have the module have a built-in
set of directives as a list? As this could then be an attribute
of many different objects, including modules.
__directives__ = { 'transitional', 'nested-scopes' }
More information about the Python-list
mailing list