[issue5135] Expose simplegeneric function in functools module

2010-07-22 Thread Ryan Freckleton
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,

[issue5135] Expose simplegeneric function in functools module

2009-02-04 Thread Ryan Freckleton
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

[issue5135] Expose simplegeneric function in functools module

2009-02-03 Thread Ryan Freckleton
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

[issue2488] Backport sys.maxsize to Python 2.6

2008-03-25 Thread Ryan Freckleton
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

[issue1411695] XML.sax.saxutils.escape -- always escapes <

2008-01-19 Thread Ryan Freckleton
Changes by Ryan Freckleton: -- components: +Documentation versions: +Python 2.6 _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1411695> _ ___ Pyth

[issue1411695] XML.sax.saxutils.escape -- always escapes <

2008-01-19 Thread Ryan Freckleton
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

[issue1093] product function patch

2007-09-02 Thread Ryan Freckleton
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