question on log as an instance method
Franck Ditter
franck at ditter.org
Sun Oct 7 04:33:36 EDT 2012
More information about the Python-list mailing list
Sun Oct 7 04:33:36 EDT 2012
- Previous message (by thread): [ann] pysha3 0.2.1 released
- Next message (by thread): question on log as an instance method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi ! Here is Python 3.2.3, MacOSX-Lion Question : I may consider + as an hidden instance method , as 1+2 is equivalent to (1).__add__(2) ? I also consider __abs__ as an instance method : >>> (-2).__abs__() 2 Question 1 : could the parser cope with the mandatory space in 1 .__add__(2) ? Question 2 : After importing math, why can't I consider log as an instance method, after all ? >>> (4).__log__() AttributeError: 'float' object has no attribute '__log__' Thanks for your answers. franck
- Previous message (by thread): [ann] pysha3 0.2.1 released
- Next message (by thread): question on log as an instance method
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list