__getitem__, __getslice__ question for python 2.2

Raymond Hettinger python at rcn.com
Wed May 15 01:56:33 EDT 2002


"logistix" <logstx at bellatlantic.net> wrote
> Also, some people don't like to use isinstance, but I'm not sure how else
to
> tell if you got an int.

if x != int(x):  print 'expected an integer'


Raymond Hettinger





More information about the Python-list mailing list