A counter-counter-proposal for PEP 236: #pragma( nested_scopes)
fredrik at pythonware.com
Thu Mar 1 20:28:10 CET 2001
Warren Postma wrote:
> I'm willing to attempt a patch if anybody else likes this idea. The pragma
> thing can be useful for other things as well. As python grows, this
> mechanism can be used instead of lots of other little cumulatively uglier
But Python isn't supposed to grow lots of pragma-style settings.
There shouldn't be any "other things". There Should Only Be One
We're talking about two kinds of "directives" here:
-- Source code encoding, which needs to be specified at the at
the top of the source file, since it affects the tokenizer/parser
(cf. XML encodings). As specified, "directive" doesn't cut it.
-- Experimental compiler features, which if successful will become
standard in the next release. Again, "directive" doesn't work, since
it makes "experimental" stuff look "optional".
And using "pragma" instead of "directive" doesn't really change a
thing; it's still hypergeneralization.
More information about the Python-list