Author serhiy.storchaka
Recipients amaury.forgeotdarc, eric.smith, mark.dickinson, pitrou, python-dev, serhiy.storchaka, sjoerd, skrah, vstinner
Date 2013-02-11.16:33:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360600420.01.0.497773923753.issue4591@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-02-11 16:33:40serhiy.storchakasetrecipients: + serhiy.storchaka, sjoerd, amaury.forgeotdarc, mark.dickinson, pitrou, vstinner, eric.smith, skrah, python-dev
2013-02-11 16:33:40serhiy.storchakasetmessageid: <1360600420.01.0.497773923753.issue4591@psf.upfronthosting.co.za>
2013-02-11 16:33:39serhiy.storchakalinkissue4591 messages
2013-02-11 16:33:39serhiy.storchakacreate