[issue33033] Clarify that the signed number convertors to PyArg_ParseTuple... *do* overflow checking

2018-03-09 Thread Antony Lee

Antony Lee  added the comment:

One could just add, immediately below the "Numbers" section, something like: 
"The signed convertors (b, h, i, ...) perform overflow checking.  The unsigned 
convertors (B, H, I, ...) do not."  That would actually be shorter than the 
current version, which repeats the second half for each unsigned entry...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33033] Clarify that the signed number convertors to PyArg_ParseTuple... *do* overflow checking

2018-03-08 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This doesn't look a good idea to me. It is implied that all checks are 
performed. For example it is implied that an error will be raised if the 
argument is of wrong type. I think that adding "with overflow checking" to 
every converting from a Python integer will just clutter the documentation.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33033] Clarify that the signed number convertors to PyArg_ParseTuple... *do* overflow checking

2018-03-08 Thread Antony Lee

New submission from Antony Lee :

At https://docs.python.org/3/c-api/arg.html#numbers, it is explicitly 
documented that the unsigned number convertors do not perform overflow 
checking.  Implicitly, this suggests that the signed convertors *do* perform 
overflow checking, which they indeed do; but it would be nice to document this 
behavior explicitly (as overflow checking is not always expected of C-level 
functions).

--
assignee: docs@python
components: Documentation
messages: 313471
nosy: Antony.Lee, docs@python
priority: normal
severity: normal
status: open
title: Clarify that the signed number convertors to PyArg_ParseTuple... *do* 
overflow checking
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com