diff options
author | Guido van Rossum <guido@python.org> | 2001-08-09 19:38:15 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-09 19:38:15 (GMT) |
commit | c11e192d416e2970e6a06cf06d4cf788f322c6ea (patch) | |
tree | 2f7ddcb418dcc70bd1ac92f618ac2275d7823a1f /Python/dynload_shlib.c | |
parent | a995c91243fe1980551b81b116ec93bb9a38a974 (diff) | |
download | cpython-c11e192d416e2970e6a06cf06d4cf788f322c6ea.zip cpython-c11e192d416e2970e6a06cf06d4cf788f322c6ea.tar.gz cpython-c11e192d416e2970e6a06cf06d4cf788f322c6ea.tar.bz2 |
Thinking back to the 2.22 revision, I didn't like what I did there one
bit. For one, this class:
class C(object):
def __new__(myclass, ...): ...
would have no way to call the __new__ method of its base class, and
the workaround (to create an intermediate base class whose __new__ you
can call) is ugly.
So, I've come up with a better solution that restores object.__new__,
but still solves the original problem, which is that built-in and
extension types shouldn't inherit object.__new__. The solution is
simple: only "heap types" inherit tp_new. Simpler, less code,
perfect!
Diffstat (limited to 'Python/dynload_shlib.c')
0 files changed, 0 insertions, 0 deletions