globalrev a écrit :
On 16 Maj, 14:19, Bruno Desthuilliers <bruno.
[EMAIL PROTECTED]> wrote:
globalrev a écrit :
(snip)
cust1 = customer.__init__('12',['1','435','2332'])
__init__ is automagically called on instanciation, so you don't have to
call it yourself. And FWIW, your __init__ returns None.

what should init return normally?

None. Your __init__ is fine, the problem is with the call. To instanciate a class, you call the class object itself, passing it the arguments awaited by __init__, ie:


cust1 = Customer('12', ['1', '435', '2332'])
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to