Ryan Freckleton added the comment:
An elaborate PEP for generic functions already exists, PEP 3124 [
http://www.python.org/dev/peps/pep-3124/]. Also note the reasons for
deferment. I'd be interested in creating a "more limited" generic function
implementation based on this PEP,
Ryan Freckleton added the comment:
I think that registering existing functions is an important use case, so
I vote for keeping the non-decorator version of register.
Another thing that we may want to document is that [simple]generic
doesn't dispatch based on registered abstract base cl
Ryan Freckleton added the comment:
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
Ryan Freckleton <[EMAIL PROTECTED]> added the comment:
Here's a patch including docstring and NEWS update for this backport.
--
keywords: +patch
nosy: +ryan.freckleton
Added file: http://bugs.python.org/file9859/patch.diff
__
Tracker <[E
Changes by Ryan Freckleton:
--
components: +Documentation
versions: +Python 2.6
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1411695>
_
___
Pyth
Ryan Freckleton added the comment:
I've included a unified diff that explicitly states the behavior of &,
<, and > for escape/unescape in the documentation. It's based on
msandler's patch.
--
nosy: +ryan.freckleton
Added file: http://bugs.python.org/fil
New submission from Ryan Freckleton:
This is a patch to implement a product() builtin function. It works
behaves similarly to reduce(operator.mul,...) but is implemented in C.
Tests and documentation are included in this patch.
--
components: Documentation, Library (Lib), Tests
files