diff options
author | Guido van Rossum <guido@python.org> | 2007-03-18 15:41:51 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-03-18 15:41:51 +0000 |
commit | 35e0295e5cf79db1fe5c3926064690b181f902f3 (patch) | |
tree | 64129082762a7f5e9ff17d310f7c617598de7c29 /Lib/ctypes/_endian.py | |
parent | 73c6e4eda41ad862c6ee5fae3b3f0bd58d789900 (diff) | |
download | cpython-35e0295e5cf79db1fe5c3926064690b181f902f3.tar.gz |
Implement PEP 3115 -- new metaclass syntax and semantics.
The compiler package hasn't been updated yet; test_compiler.py fails.
Otherwise all tests seem to be passing now. There are no occurrences
of __metaclass__ left in the standard library.
Docs have not been updated.
Diffstat (limited to 'Lib/ctypes/_endian.py')
-rw-r--r-- | Lib/ctypes/_endian.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/ctypes/_endian.py b/Lib/ctypes/_endian.py index 6de0d47b2c..61ac33475b 100644 --- a/Lib/ctypes/_endian.py +++ b/Lib/ctypes/_endian.py @@ -42,18 +42,16 @@ if sys.byteorder == "little": LittleEndianStructure = Structure - class BigEndianStructure(Structure): + class BigEndianStructure(Structure, metaclass=_swapped_meta): """Structure with big endian byte order""" - __metaclass__ = _swapped_meta _swappedbytes_ = None elif sys.byteorder == "big": _OTHER_ENDIAN = "__ctype_le__" BigEndianStructure = Structure - class LittleEndianStructure(Structure): + class LittleEndianStructure(Structure, metaclass=_swapped_meta): """Structure with little endian byte order""" - __metaclass__ = _swapped_meta _swappedbytes_ = None else: |