Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 19890:31fe8b3e276b legacy-trunk
build_class(): one more (hopefully the last) step on the way to
backwards compatibility. When using the class of the first base as
the metaclass, use its __class__ attribute in preference over its
ob_type slot. This ensures that we can still use classic classes as
metaclasse, as shown in the original "Metaclasses" essay. This also
makes all the examples in Demo/metaclasses/ work again (maybe these
should be turned into a test suite?).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 12 Sep 2001 19:19:18 +0000 |
| parents | e1c91ac55cca |
| children | 55874d8e0dfb |
