[Python-Dev] ABCs and simplegeneric use case
Paul Moore
p.f.moore at gmail.com
Mon Mar 2 14:25:10 CET 2009
2009/3/1 Nick Coghlan <ncoghlan at gmail.com>:
> As much as I'd like to get a simple generic implementation into
> functools, the lack of support for ABCs still bothers me (despite my
> last post about that on the tracker item). I'd be a -0 on it going in as
> is, but if someone can figure out a clever way of supporting ABCs
> without completing killing the invocation speed for generics, that would
> go up to a +1.
Nick,
Armin Ronacher pointed out that it's not likely to be possible to
enumerate ABCs even in theory, as ABCs can do semantic checks (e.g.
checking for the presence of special methods like __iter__) without
needing either inheritance or explicit registration.
As you had a genuine use case for simplegeneric, how badly does this
limitation damage it?
Paul.
More information about the Python-Dev
mailing list