Help me understand this

Christophe chris.cavalaria at free.fr
Wed Jan 31 05:33:39 EST 2007


James Stroud a écrit :
> Beej wrote:
>>>>> (2).__add__(1)
> 
> Nice. I would have never thought to put parentheses around an integer to 
> get at its attributes.
> 
> James

You can also do it like that :

 >>> 2 .__add__(1)
3



More information about the Python-list mailing list