[Python-Dev] #pragmas in Python source code

Ka-Ping Yee ping@lfw.org
Wed, 12 Apr 2000 12:35:59 -0500 (CDT)


On Wed, 12 Apr 2000, Fred L. Drake, Jr. wrote:
>   The problem with this proposal is that the pragmas are embedded in
> the comments; I'd rather see a new keyword and statement.  It could be
> defined something like:
> 
> pragma_atom: NAME | NUMBER | STRING+
> pragma_stmt: 'pragma' NAME ':' pragma_atom (',' pragma_atom)*

Wa-wa-wa-wa-wait... i thought the whole point of pragmas was
that they were supposed to control the operation of the parser
itself (you know, set the source character encoding and so on).
So by definition they would have to happen at a different level,
above the parsing.

Or do we need to separate out two categories of pragmas --
pre-parse and post-parse pragmas?


-- ?!ng