A counter-counter-proposal for PEP 236: #pragma( nested_scopes)

Fredrik Lundh fredrik at pythonware.com
Thu Mar 1 14:28:10 EST 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
> hacks.

But Python isn't supposed to grow lots of pragma-style settings.
There shouldn't be any "other things".  There Should Only Be One
Language.

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.

Cheers /F





More information about the Python-list mailing list