This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2007-06-03.06:50:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I don't see an easy way to make this a defined behavior.

FWIW, the OP's code suggests that it makes a more specific test than it does (since -0.0 == 0.0) so the test succeed when n is either -0.0 or 0.0.  A quick fix in his code would be to eliminate the -0.0 from the code.  

def r(n):
    if n == 0.0:
        return 0.0
    return n

or more succinctly:

def r(n):
    return n or 0.0
History
Date User Action Args
2007-08-23 14:54:21adminlinkissue1729014 messages
2007-08-23 14:54:21admincreate