Nadeem Vawda <nadeem.va...@gmail.com> added the comment:

Thanks for the review. I've made most of the changes you suggested, but there's
one thing I wanted to check about:

> - instead of "int(size)", use "size = size.__index__()" so as to forbid floats

The tests for readline() and readlines() expect a TypeError if size is None.
Calling size.__index__() in this case raises an AttributeError instead. Should I
change the tests to expect an AttributeError? Alternatively, something like this
would more closely match the behaviour of the old code:

    try:
        size = size.__index__()
    except AttributeError:
        raise TypeError("Integer argument expected")

----------

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

Reply via email to