[Python-Dev] #pragmas in Python source code
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 12 Apr 2000 13:38:26 -0400 (EDT)
Ka-Ping Yee writes:
> 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.
Hmm. That's one proposed use, which doesn't seem to fit well with
my proposal. But I don't know that I'd think of that as a "pragma" in
the general sense.
I'll think about this one. I think encoding is a very special case,
and I'm not sure I like dealing with it as a pragma.
Are there any other (programming) languages that attempt to deal
with multiple encodings? Perhaps I missed a message about it.
> Or do we need to separate out two categories of pragmas --
> pre-parse and post-parse pragmas?
Eeeks! We don't need too many special forms! That's ugly!
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives