Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11650)

#20260: Argument Clinic: add unsigned integers converters

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by storchaka+cpython
Modified:
6 months, 4 weeks ago
Reviewers:
larry
CC:
Georg, mark.dickinson, larry, rmsr, storchaka, Josh.R
Visibility:
Public.

Patch Set 1 #

Total comments: 2

Patch Set 2 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/howto/clinic.rst View 1 1 chunk +6 lines, -0 lines 0 comments Download
Include/longobject.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
Misc/NEWS View 1 1 chunk +2 lines, -0 lines 0 comments Download
Modules/selectmodule.c View 1 4 chunks +6 lines, -21 lines 0 comments Download
Modules/zlibmodule.c View 1 6 chunks +7 lines, -45 lines 0 comments Download
Objects/longobject.c View 1 1 chunk +100 lines, -0 lines 2 comments Download
Tools/clinic/clinic.py View 1 5 chunks +21 lines, -12 lines 0 comments Download

Messages

Total messages: 3
larry
This patch is just about perfect. I have only minor complaints. If you accept both ...
5 years, 1 month ago #1
larry
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 ...
5 years ago #2
storchaka
6 months, 4 weeks ago #3
https://bugs.python.org/review/20260/diff/10585/Objects/longobject.c
File Objects/longobject.c (right):

https://bugs.python.org/review/20260/diff/10585/Objects/longobject.c#newcode1426
Objects/longobject.c:1426: if (PyLong_Check(obj) && _PyLong_Sign(obj) < 0) {
On 2014/01/24 16:38:56, larry wrote:
> Maybe instead of doing these checks by hand, it should just call
> PyLong_AsUnsignedLong()?  I'm sure that already throws an exception if the
> object isn't a Long, or if it's negative.

It throws an OverflowError for negative Long, but we want a ValueError.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+