[issue2801] Py30a5 float.is_integer() raises ValueError

Mark Summerfield report at bugs.python.org
Fri May 9 16:33:43 CEST 2008


Mark Summerfield <mark at qtrac.eu> added the comment:

On 2008-05-09, Mark Dickinson wrote:
> Mark Dickinson <dickinsm at gmail.com> added the comment:
>
> Is this on Windows?  I can't reproduce it on OS X 10.5.2:
>
> Python 3.0a5+ (py3k:62937M, May  9 2008, 09:32:27)
> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> x = 5.0
> >>> x.is_integer()
>
> True

I'm on Linux:

'3.0a5 (r30a5:62856, May  9 2008, 11:23:06) \n[GCC 4.1.2 20070925 (Red Hat 
4.1.2-33)]'
>>> (5.).as_integer_ratio()
(5, 1)
>>> (5.).is_integer()
Traceback (most recent call last):
  File "<pyshell#99>", line 1, in <module>
    (5.).is_integer()
ValueError: (11, 'Resource temporarily unavailable')

(I can't test on Windows because Py30a5 isn't available for it yet.)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2801>
__________________________________


More information about the Python-bugs-list mailing list