]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Added a class PEP252Mixin. By adding this to your ObjectDefinition you
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 25 Nov 2002 16:36:49 +0000 (16:36 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 25 Nov 2002 16:36:49 +0000 (16:36 +0000)
commit3d654d6dff9de4ec1034dff667ff665fa5456215
treefb4c04cfbd8e3d22eb5978553504acab68accaa6
parent9e7453dc718431cef3832f6ab32c57f64f574dfb
Added a class PEP252Mixin. By adding this to your ObjectDefinition you
get PEP-252 style objects in stead of old-fashioned objects.
In stead of defining a GetattrHook you declare a class variable getsetlist,
which contains tuples (name, getcode, setcode, docstring).
Only lightly tested: the code still works if you don't inherit PEP252Mixin
and the code works if you inherit it but don't define any getters
or setters. Also, this will not work together with the "poor mans inheritance"
offered by method chains, so the CF module will remain with old-style
objects until PEP253 is supported too.
Tools/bgen/bgen/bgenObjectDefinition.py