diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-06-12 01:22:22 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-06-12 01:22:22 (GMT) |
commit | 7a3bfc3a472dafc42d20845389eb79db8af0b046 (patch) | |
tree | 5b59ec1db42d4559a21af550c3b068b053ac79d2 /Misc | |
parent | ac4797a12eed2fb5bcc68ae6e768e5ab4ec5b422 (diff) | |
download | cpython-7a3bfc3a472dafc42d20845389eb79db8af0b046.zip cpython-7a3bfc3a472dafc42d20845389eb79db8af0b046.tar.gz cpython-7a3bfc3a472dafc42d20845389eb79db8af0b046.tar.bz2 |
Added q/Q standard (x-platform 8-byte ints) mode in struct module.
This completes the q/Q project.
longobject.c _PyLong_AsByteArray: The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.
test_struct.py: This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.
NEWS: Added brief dict news while I was at it.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -84,6 +84,9 @@ Core sortdict(dict) function for a simple way to display a dict in sorted order. +- Many other small changes to dicts were made, resulting in faster + operation along the most common code paths. + - Dictionary objects now support the "in" operator: "x in dict" means the same as dict.has_key(x). @@ -119,7 +122,7 @@ Core - Collisions in dicts are resolved via a new approach, which can help dramatically in bad cases. For example, looking up every key in a dict - d with d.keys() = [i << 16 for i in range(20000)] is approximately 500x + d with d.keys() == [i << 16 for i in range(20000)] is approximately 500x faster now. Thanks to Christian Tismer for pointing out the cause and the nature of an effective cure (last December! better late than never). @@ -145,8 +148,8 @@ Library native mode, these can be used only when the platform C compiler supports these types (when HAVE_LONG_LONG is #define'd by the Python config process), and then they inherit the sizes and alignments of the C types. - XXX TODO In standard mode, 'q' and 'Q' are supported on all platforms, and - XXX TODO are 8-byte integral types. + In standard mode, 'q' and 'Q' are supported on all platforms, and are + 8-byte integral types. Tests |