jdnier at gmail.com
Thu Aug 12 22:37:04 CEST 2010
[Oops, now complete...]
Peter Otten <__pete... at web.de> wrote:
> > >>> 1 .conjugate()
This is a syntax I never noticed before. My built-in complier (eyes)
took one look and said: "that doesn't work." Has this always worked in
Python but I never noticed? I see other instance examples also work.
>>> '1' .zfill(2)
>>> 1.0 .is_integer()
>>> 1.0 .real
Curiously, a float literal works without space
but not an int.
File "<stdin>", line 1
SyntaxError: invalid syntax
Anyway, I didn't realize int has a method you can call.
More information about the Python-list