constructor question

azrael jura.grozni at gmail.com
Mon Jan 21 17:51:46 EST 2008


lets supose i have a object

>>>class a:
>>>   __init__(self,b):
>>>        self.b=b

>>>object=a(2)


how can I bind the object with "print". I supose that this should be
possible with a constructor. but I don't know how.

>>>print a
2
>>>

Something like this


Thnx



More information about the Python-list mailing list