[Python-Dev] #pragmas in Python source code
M.-A. Lemburg
mal@lemburg.com
Fri, 14 Apr 2000 10:24:30 +0200
"Fred L. Drake, Jr." wrote:
>
> M.-A. Lemburg writes:
> > Hmm, anything else would introduce a new keyword, I guess. And
> > new keywords cause new scripts to fail in old interpreters
> > even when they don't use Unicode at all and only include
> > <whatever the name is> per convention.
>
> Only if the new keyword is used in the script or anything it
> imports. This is exactly like using new syntax (u'...') or new
> library features (unicode('abc', 'iso-8859-1')).
Right, but I would guess that people would then start using these
keywords in all files per convention (so as not to trip over
bugs due to wrong encodings).
Perhaps I'm overcautious here...
> I can't think of anything that gets included "by convention" that
> breaks anything. I don't recall a proposal that we should casually
> add pragmas to our scripts if there's no need to do so. Adding
> pragmas to library modules is *not* part of the issue; they'd only be
> there if the version of Python they're part of supports the syntax.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/