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 loewis
Recipients Robert.Withrow, TD22057, loewis, mark.dickinson, vstinner
Date 2011-03-17.16:35:10
SpamBayes Score 1.0649259e-12
Marked as misclassified No
Message-id <4D82383C.8070801@v.loewis.de>
In-reply-to <1300378418.0.0.0848432554192.issue4114@psf.upfronthosting.co.za>
Content
> Martin: in C I have the luxury of using 32 bit floats; not an option
> in Python.  Simple code doing the moral equivalent of NTOHL(HTONL())
> works in this case for C but wouldn't help for Python.

If you agree that Python actually behaves correct, I fail to
understand what it is that you disagree with in msg131195

If all you want is a documentation change, can you please propose
specific wording?

> Even worse, there is no straightforward way (that I'm aware of) to
> write portable tests for code using the 'f' format character.

If you use numbers that are exactly representable as floats,
the test should be portable to all platforms that use 32-bit
IEEE-754 floats. If you then also use numbers without a fractional
part, it should even port to non-IEEE platforms (as long as you
don't test for the intermediate bytes).

[...]
> This test will fail when you use the 'f' format code.

So use 6.25 instead.
History
Date User Action Args
2011-03-17 16:35:11loewissetrecipients: + loewis, mark.dickinson, vstinner, TD22057, Robert.Withrow
2011-03-17 16:35:10loewislinkissue4114 messages
2011-03-17 16:35:10loewiscreate