Carl Banks a écrit : (snip)
class A(object): def __init__(self,*args,**kwargs): raise TypeError('Type not callable; use factory function instead') @classmethod def _create_object(cls,initial_value): self = object.__new__(cls) # avoid __init__ self.value = initial_value
I assume there's a missing "return self" line here ?-) -- http://mail.python.org/mailman/listinfo/python-list