]> granicus.if.org Git - python/commit
Change in policy: when a slot_tp_xxx function looks for the __xxx__ method,
authorGuido van Rossum <guido@python.org>
Tue, 28 Aug 2001 17:47:51 +0000 (17:47 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 28 Aug 2001 17:47:51 +0000 (17:47 +0000)
commit607187325fa364bb170de354f7a12ec60a973ff7
treed3b2e0ef5bb12257d814329f158012bf30ffef01
parent2ac9c3eec5807b6032e5aef6481fcf67c1965efc
Change in policy: when a slot_tp_xxx function looks for the __xxx__ method,
don't use getattr, but only look in the dict of the type and base types.
This prevents picking up all sorts of weird stuff, including things defined
by the metaclass when the object is a class (type).

For this purpose, a helper function lookup_method() was added.  One or two
other places also use this.
Objects/typeobject.c