Antoine Pitrou <pit...@free.fr> added the comment: > 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")
Ah, you're right, TypeError should be raised. ---------- _______________________________________ 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