This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ryan.freckleton
Recipients ncoghlan, paul.moore, ryan.freckleton
Date 2009-02-04.02:43:19
SpamBayes Score 1.84868e-05
Marked as misclassified No
Message-id <>
PJE seems to have borrowed the time machine :-). Based on the code the
register function is already a decorator:

    def register(typ, func=None):
        if func is None:
            return lambda f: register(typ, f)
        registry[typ] = func
        return func

The returned lambda is a one argument decorator. so your syntax:

    def xxx_impl(xxx):

Already works. A test to validate this behavior should probably be added.

I don't mean to bikeshed, but could we call this function
functools.generic instead of functools.simplegeneric? The only reason I
can think of for keeping it simplegeneric would be to avoid a future
name clash with the Generic Function PEP and if/when that PEP get's
implemented, I would think that the functionality would live in
builtins, not functools.
Date User Action Args
2009-02-04 02:43:21ryan.freckletonsetrecipients: + ryan.freckleton, paul.moore, ncoghlan
2009-02-04 02:43:21ryan.freckletonsetmessageid: <>
2009-02-04 02:43:20ryan.freckletonlinkissue5135 messages
2009-02-04 02:43:19ryan.freckletoncreate