[Python-3000] Reserve "pragma" keyword in Python 3.0?

"Martin v. Löwis" martin at v.loewis.de
Sat Mar 22 00:51:48 CET 2008


> I think Python needs a dedicated "pragma" syntax; we already have two 
> pragma syntaxes ("from __future__ import" and "# coding"), and I think a 
> syntax designed for expressing pragmas would be much clearer than using 
> existing language features in weird ways to express pragmas.  But that's 
> a debate for another day.

See the (rejected) PEP 244.

> Today's topic is much smaller in scope: can I get support for making 
> "pragma" a reserved keyword in Python?  Guido himself suggested doing 
> that back in August of 2000 during a previous pragma-y discussion:
> 
>     http://mail.python.org/pipermail/python-dev/2000-August/008840.html
> 
> I'm not proposing that the keyword do anything, just that "pragma" be 
> reserved for future expansion, and therefore be illegal for use as an 
> identifier.  For now any use of it would be an error.
> 
> If there's some chance it would be accepted, I would happily make the patch.

I don't think there is. Making it a keyword now means essentially to
agree that the feature will be added later, so opponents of the feature
will oppose the first step.

Regards,
Martin


More information about the Python-3000 mailing list