Re: Abstract Base Class register function

2008-09-27 Thread Benjamin
On Sep 27, 4:50 pm, "Mikolai Fajer" <[EMAIL PROTECTED]> wrote: > I have been experimenting with the abc module in py3k and thought > about using the register method of an ABC as a class decorator: > > > import abc > class MyABC(metaclass=abc.ABCMeta): >     pass > > @MyABC.register > class MySub()

Abstract Base Class register function

2008-09-27 Thread Mikolai Fajer
I have been experimenting with the abc module in py3k and thought about using the register method of an ABC as a class decorator: import abc class MyABC(metaclass=abc.ABCMeta): pass @MyABC.register class MySub(): pass This doesn't work because the register method returns None. It woul