Mark Dickinson <dicki...@gmail.com> added the comment: Thanks for the patch.
Are there practical cases where the operator.index check is more useful that the isinstance(..., (int, long)) check that you originally proposed (off-tracker)? While I agree that it's the right fix in principle, the operator.index check smells a bit like new functionality to me, and risks changing behaviour for those (rare, I hope) user-defined classes that implement both __index__ and sequence methods. ---------- nosy: +mark.dickinson _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11673> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com