Paul Moore wrote:
2009/1/30 Walter Dörwald <walter@livinglogic.de>:
Paul Moore wrote:
[...] In all honesty, I think pkgutil.simplegeneric should be documented, exposed, and moved to a library of its own[1]. http://pypi.python.org/pypi/simplegeneric
Thanks, I was aware of that.
I wasn't aware of the fact that simplegeneric is part of the stdlib, albeit in a strange spot.
I assume that the barrier to getting this into the stdlib will be higher than to simply exposing an implementation already available in the stdlib.
At least we'd need documentation and tests. And of course the code must be stable and there must be someone willing to maintain it (then again it's less than 40 lines of code). There should be enough third-party module that use it to justify making simplegeneric an official part of the stdlib. The best spot for generic() is probably in the functools module.
To be honest, all I would like is for these regular "let's have another special method" discussions to become unnecessary...
Me too. Servus, Walter