Kermit Mei wrote: > #!/usr/bin/env > python > > class Test: > 'My Test class' > def __init__(self): > self.arg1 = 1 > > def first(self): > return self.arg1 > > t1 = Test
't1' is now an alternative name for 'Test'. What you wanted instead was to instantiate 'Test', which you do with this syntax: t1 = Test() > print t1.first() 't1.first' or 'Test.first' is a function that takes a single argument (by convention, that should be an instance of 'Test'). However, no such instance is provided: > TypeError: unbound method first() must be called with Test instance as > first argument (got nothing instead) Note that you can invoke the 'first' function in two ways: t1.first() Test.first(t1) Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- http://mail.python.org/mailman/listinfo/python-list