Serhiy Storchaka added the comment:

> Not technically the topic of this issue, but should we just lock
> down _Py_Uid_Converter() to ints?

I just copied this code from PyArg_ParseTuple*() for 'l' format.

> This is still accepted:
>
> os.setuid(Decimal("1000.2"))

Any C implemented function which parses an integer argument with 
PyArg_ParseTuple*() accepts decimals.

>>> chr(65.2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: integer argument expected, got float
>>> chr(Decimal('65.2'))
'A'

I think this is an offtopic for this issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to