Personal tools
You are here: Home CDAT Tips and Tricks Python Tips Object tips in python.
Document Actions

Object tips in python.

by Renata McCoy last modified 2007-05-08 10:51

Goal: Learn some python tricks for objects.


  • “_” represents last object returned.
  • Python objects are always instance of something, to check the class type:
print object.__class__
  • Quering object type:
if isinstanceof(a,(int,float,str,list,tuple))
  • Most objects/functions are self documented, get help by typeing:
print obj.__doc__


Powered by Plone