[Checkins] [zopefoundation/ExtensionClass] 762af9: fix calling `__class_init__` hook by the Python im...
GitHub
noreply at github.com
Wed Apr 1 03:23:32 CEST 2015
Branch: refs/heads/fix-__class_init__
Home: https://github.com/zopefoundation/ExtensionClass
Commit: 762af92148cffa8f7de86574d638f6c7494bbd22
https://github.com/zopefoundation/ExtensionClass/commit/762af92148cffa8f7de86574d638f6c7494bbd22
Author: David Glick <david at glicksoftware.com>
Date: 2015-03-31 (Tue, 31 Mar 2015)
Changed paths:
M CHANGES.rst
M src/ExtensionClass/__init__.py
M src/ExtensionClass/tests.py
Log Message:
-----------
fix calling `__class_init__` hook by the Python implementation
Always call `__class_init__` as an unbound function, like the C implementation does,
so it works even when `__class_init__` is patched in after class creation like
Zope does to `Persistent`.
The extra check for `__func__` is because getting a function attribute in Python 3
does not turn it into a method.
More information about the checkins
mailing list