[Python-Dev] Re: ANNOUNCE: 'goto' for Python

Hye-Shik Chang perky at i18n.org
Thu Apr 1 22:24:24 EST 2004

On Fri, Apr 02, 2004 at 02:31:06PM +1200, Greg Ewing wrote:
> Mike Rovner <mike at nospam.com>:
> > Shall I file a bug about python lexer which allows space between class and
> > attribute? Or that's a fiature?
> It's certainly not a bug. An identifier and a dot following it
> are separate lexical tokens, so whitespace should be allowed
> between them in the interests of consistency, even if it's not
> all that useful.

Agreed. At least it has one usage:

>>> 1 .__add__
<method-wrapper object at 0x81c4dec>
>>> 1.__add__
  File "<stdin>", line 1
SyntaxError: invalid syntax
>>> addone = 1 .__add__
>>> addone(5)

Even though it's not so beautiful. :)


More information about the Python-Dev mailing list