[Python-Dev] Deprecating float.is_integer() (original) (raw)
Steve Holden steve at holdenweb.com
Wed Mar 21 12:22:53 EDT 2018
- Previous message (by thread): [Python-Dev] Deprecating float.is_integer()
- Next message (by thread): [Python-Dev] Deprecating float.is_integer()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Mar 21, 2018 at 3:08 PM, Guido van Rossum <guido at python.org> wrote:
I searched 6M LoC of Python code at Dropbox and found only three uses. They seem legit. Two are about formatting a number that's given as a float, deciding whether to print a float as 42 or 3.14. The third is attempting a conversion from float to integer where a non-integer must raise a specific exception (the same function also supports a string as long as it can be parsed as an int).
I don't doubt we would get by if isinteger() was deprecated. Since code that's been deleted can't have bugs, +1. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180321/e71247cd/attachment.html>
- Previous message (by thread): [Python-Dev] Deprecating float.is_integer()
- Next message (by thread): [Python-Dev] Deprecating float.is_integer()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]