On Tue, Jan 31, 2012 at 8:11 AM, Matt Joiner <[email protected]> wrote: > It's also potentially lossy if you incremented and decremented until integer > precision is lost. My vote is for an int type check. No casting.
operator.index() is built for that purpose (it's what we use these days to restrict slicing to integers). +1 for the type restriction from me. Cheers, Nick. -- Nick Coghlan | [email protected] | Brisbane, Australia _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
