[Python-checkins] r51119 - in python/trunk: Lib/test/test_struct.py Misc/NEWS Modules/_struct.c
Neal Norwitz
nnorwitz at gmail.com
Fri Aug 11 06:33:51 CEST 2006
> Modified: python/trunk/Lib/test/test_struct.py
> ==============================================================================
> --- python/trunk/Lib/test/test_struct.py (original)
> +++ python/trunk/Lib/test/test_struct.py Sat Aug 5 01:59:21 2006
> @@ -15,9 +15,11 @@
> except ImportError:
> PY_STRUCT_RANGE_CHECKING = 0
> PY_STRUCT_OVERFLOW_MASKING = 1
> + PY_STRUCT_FLOAT_COERCE = 2
> else:
> - PY_STRUCT_RANGE_CHECKING = _struct._PY_STRUCT_RANGE_CHECKING
> - PY_STRUCT_OVERFLOW_MASKING = _struct._PY_STRUCT_OVERFLOW_MASKING
> + PY_STRUCT_RANGE_CHECKING = getattr(_struct, '_PY_STRUCT_RANGE_CHECKING', 0)
> + PY_STRUCT_OVERFLOW_MASKING = getattr(_struct, '_PY_STRUCT_OVERFLOW_MASKING', 0)
> + PY_STRUCT_FLOAT_COERCE = getattr(_struct, '_PY_STRUCT_FLOAT_COERCE', 0)
It would be really nice to document what each of these values mean.
It's confusing without reading the code and seems odd to me.
Particularly PY_STRUCT_FLOAT_COERCE.
I closed the bug report/patch associated with this checkin.
Thanks,
n
More information about the Python-checkins
mailing list