This patch is just about perfect. I have only minor complaints. If you accept
both my suggested changes, you have my blessing to check it in. Thanks, this
helps!
http://bugs.python.org/review/20260/diff/10568/Doc/howto/clinic.rst
File Doc/howto/clinic.rst (right):
http://bugs.python.org/review/20260/diff/10568/Doc/howto/clinic.rst#newcode732
Doc/howto/clinic.rst:732: \ ``unsigned_short``
Please remove these from this table. This table shows the reader how to change
legacy converters into real converters; these new converters have no legacy
equivalent.
Instead, please add a whole new paragraph, just above line 752 here ("Argument
Clinic will show you [...]"). The paragraph should read:
One advantage of real converters is that
they're more flexible than legacy converters. For
example, the ``unsigned_int`` converter (and all the
``unsigned_`` converters) can be specified without
``bitwise=True``. Their default behavior performs range
checking on the value, and they won't accept negative
numbers. You just can't do that with a legacy converter!
http://bugs.python.org/review/20260/diff/10568/Include/longobject.h
File Include/longobject.h (right):
http://bugs.python.org/review/20260/diff/10568/Include/longobject.h#newcode69
Include/longobject.h:69: PyAPI_FUNC(int) _Py_UnsignedShort_Converter(PyObject *,
void *);
This should be named "_PyLong_UnsignedShortConverter", and the same approach
applies to the other four new functions.
Sorry for the bikeshedding but I do think this is more in keeping with Python's
style. Python C functions with this camel-case style name don't get additional
underscores as word breaks (e.g. "PyUnicode_FSConverter").
Quick feedback on one aspect of the patch, not a full review. http://bugs.python.org/review/20260/diff/10585/Objects/longobject.c File Objects/longobject.c ...
Issue 20260: Argument Clinic: add unsigned integers converters
Created 5 years, 1 month ago by storchaka
Modified 6 months, 4 weeks ago
Reviewers: larry
Base URL: None
Comments: 4