John, > Do you care about numbers that are representable as an int, but are treated > as inf by float()? > > For example: > | >>> s = '1' * 310 > | >>> float(s) > | inf > | >>> a = int(s) > | >>> # OK
My code range checks all numbers once they've been parsed, so I don't believe this will be a problem for me. However, I appreciate you pointing out this behavior because I was unaware of this subtle nuance. I'll make sure to add this to our code review checklist. Thanks for your feedback, Malcolm -- http://mail.python.org/mailman/listinfo/python-list