n00b question on spacing

Chris Angelico rosuav at gmail.com
Tue Jun 25 07:48:37 EDT 2013


On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern <robert.kern at gmail.com> wrote:
> There is quite a bit of Python's lexical analysis that is specified in
> places other than the formal notation. That does not mean it is undefined.
> It is well defined in the lexer code and the documentation. You suggest that
> a "rule probably should be added to the lexer to make this explicit." That
> is not necessary. The rule is already there.

Be careful; Python is not an implementation-defined language. Python
has no "lexer code" - CPython does, and is probably what you're
thinking of. (There are other languages that *are*
implementation-defined, meaning that it *is* correct to talk about
features in that way. Python just isn't one of them.) Sometimes a rule
needs to be clarified to mandate something that was previously left up
to the implementation; however, if that's the case, the rule would not
be added to the lexer, but to the documentation.

ChrisA



More information about the Python-list mailing list