Why not 3.__class__ ?
Paul Miller
paul at fxtech.com
Tue Oct 9 13:58:43 EDT 2001
> I haven't followed the discussion
> but to write 3.foo is something I would like to have in Python
> I am a big fan of Ruby and there you can write
> for example
> -4.abs
> which gives 4 (of course)
**COUGH**syntactic sugar**cough**
It may be "cool" (oh look everything is an object), but Python is also a
functional language and in many cases it's just more clear to use that
instead
I prefer "print abs(-4)"
More information about the Python-list
mailing list