[New-bugs-announce] [issue10868] ABCMeta.register() should work as a decorator

Edoardo Spadolini report at bugs.python.org
Sun Jan 9 00:32:13 CET 2011

New submission from Edoardo Spadolini <kerio00 at gmail.com>:

If we make ABCMeta.register() return the registered class, like atexit.register() does for the registered function, we can then use it as a decorator:


class Foo:

With this change:

class Foo:

The only problem this would cause is in code that relies on ABCMeta.register() to return None; I can't think of a reason anyone would rely on this, but...

components: Library (Lib)
files: abcmeta_register_deco.diff
keywords: patch
messages: 125804
nosy: kerio
priority: normal
severity: normal
status: open
title: ABCMeta.register() should work as a decorator
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file20314/abcmeta_register_deco.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list