his
checking code in the __init__ method of every subclass.
Is there an easier way than using a metaclass and writing a custom
__call__ method?
--
Felix Wiemann -- http://www.ososo.de/
--
http://mail.python.org/mailman/listinfo/python-list
Steven Bethard wrote:
> Felix Wiemann wrote:
>
>> How can I prevent __init__ from being called on the
>> already-initialized object?
>
> The short answer: you can't:
> http://www.python.org/2.2.3/descrintro.html#__new__
What a pity. By the way, I'm just
return_list.append([])
for j in i:
if done.setdefault(j[1], 0) in indices[j[1]]:
return_list[-1].append(j)
done[j[1]] += 1
return return_list
--
Felix Wiemann -- http://www.ososo.de/
--
http://mail.python.org/mailman/listinfo/python-list
hings"""
def baz(self):
"""Baz things in a C manner"""
class Implementation(Interface):
def foo(self):
pass
def bar(self):
pass
def baz(self):
pass
print Implementation.foo.__doc__
print I