Why not 3.__class__ ?

Michael Abbott michael at rcp.co.uk
Thu Oct 11 02:42:18 EDT 2001


"John Roth" <johnroth at ameritech.net> wrote in 
news:ts9hf46rvfp73a at news.supernews.com:

> I presume (although I haven't tested it) that "3(x, y, z)" produces a
> "not callable object" error, and "3[x]" produces a "not subscriptable"
> error as well. I really can't see what calling '3' would do, but
> subscripting '3' might be a neat way of getting the bit representation.


Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> 3(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: object is not callable: 3
>>>


Excellent!  Already does the right thing...



More information about the Python-list mailing list