Message 92400 - Python tracker (original) (raw)

+10. It would fix the os.urandom(1.2) bug. On Linux, os.urandom() displays the following warnings and then go into an unlimited loop...

/usr/lib/python2.5/os.py:734: DeprecationWarning: integer argument expected, got float bytes += read(_urandomfd, n - len(bytes))

read(1.2 - 1) ~> read(0.2) ~> read(0)...

Tolerate float as integers introduces "subtle" bugs like byte/unicode bugs...