Spaces in object attribute

Alex Martelli aleax at aleax.it
Thu Jan 10 11:24:21 EST 2002


"Oleg Broytmann" <phd at phd.pp.ru> wrote in message
news:mailman.1010678211.501.python-list at python.org...
> On Thu, Jan 10, 2002 at 04:49:07PM +0100, Cesar Douady wrote:
> > someVariable      .myAttr = ...
> > someLongerVariable.myAttr = ...
>
>    I prefer
>
> someVariable.myAttr       = ...
> someLongerVariable.myAttr = ...

I prefer to have only one space on either side of '='.  I believe
that's what Guido has in his style guide, too.

But the point is, should Python complicate its lexing rules to
force the preferred style?  It seems to me that having simple
rules (whitespace allowed between any two tokens) is best here.


Alex






More information about the Python-list mailing list