I come to praise .join, not to bury it...

Rainer Deyke root at rainerdeyke.com
Wed Mar 7 21:07:06 EST 2001


"D-Man" <dsh8290 at rit.edu> wrote in message
news:mailman.983997159.4842.python-list at python.org...
> Even with my newfound understanding, provided by the Martellibot, I
> agree with this.  Calling a method on an object is fine.  Calling it
> on a literal looks weird.  Take for example something like this
>
> three = 1.__add__( 2 )

How about 'three = (1).__add__(2)'?  Adding parentheses around the literal
should make this look right; otherwise you are not calling methods on the
results of complex expressions often enough.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list