[New-bugs-announce] [issue16694] Add pure Python operator module

Zachary Ware report at bugs.python.org
Sun Dec 16 08:24:41 CET 2012


New submission from Zachary Ware:

(Brett, I've made you nosy due to the relation to Issue16651.)

Here is a pure Python implementation of the operator module, or at least a first draft thereof :).  I'm attaching the module itself, as well as a patch to integrate it.

Any and all review is quite welcome. I'm confident in the fact that the module as it stands passes all current tests, but how it gets there is entirely up for debate (namely, the attrgetter, itemgetter, and methodcaller classes, as well as length_hint(), countOf(), and indexOf()).

Note that there's also a change to hmac.py; _compare_digest() in operator.c doesn't seem to have any relation to the rest of the module (see issue15061 discussion) and is private anyway, so operator.py doesn't go near it.  hmac.py has to import directly from _operator.

Thanks,

Zach Ware

----------
components: Extension Modules, Library (Lib)
files: operator.py
messages: 177579
nosy: brett.cannon, zach.ware
priority: normal
severity: normal
status: open
title: Add pure Python operator module
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28327/operator.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16694>
_______________________________________


More information about the New-bugs-announce mailing list