[M.-A. Lemburg] > ... > I'm not picky about the '='; if people don't want it, I'll > happily drop it from the PEP. The only reason I think it may be > worthwhile adding it is because it simply looks right: > > directive unicodeencoding = 'latin-1' > > rather than > > directive unicodeencoding 'latin-1' The hangup is finding someone who cares enough <0.9 wink> to change the text and implementation of the directive PEP. There was no significant debate about the proposed directive syntax in that, and in years past similar crusades that did attract debate floundered on the inability to reach consensus on overall syntax; it's not a good sign that the first proposed use wanted syntax the PEP doesn't support. > ... > Still, if people would like to use Unicode literals for module > doc-strings, then they should place the directive *before* the > doc-string accepting that this could break some tools (the PEP > currently does not restrict the placement of the directive). > Alternatively, we could allow placing the directive into a > comment, e.g. > > #!/usr/local/python > #directive unicodeencoding = 'utf-8' > u""" > This is a Unicode doc-string > """ Another alternative: #!/usr/local/python directive unicodeencoding 'utf-8' __doc__ = u""" This is a Unicode doc-string """ That is, the module docstring is just the module's __doc__ attr, and that can be bound explicitly (a trick I've sometimes use for *computed* module docstrings).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4