RE: %b format (no, really)
[Guido]
Why bother with floats at all?
[Greg Wilson]
For teaching purposes
[Tim Peters] if you separate the mantissa and exponent for floats the result won't "look like" the storage at all. Please give an example first
This is part of what was going to go into the PEP, along with what to do about character data (I've had a couple of emails from people who'd like to be able to look at 8-bit and Unicode characters as bit patterns).
This is too much for %b -- write a float-format module instead.
How about a quick patch to do "%b" for int and long-int, and a PEP for a generic "format" module --- arbitrary radix, options for IEEE numbers, etc.? Any objections? Greg ----------------------------------------------------------------------------------------------------------------- The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Baltimore Technologies plc will not be liable for direct, special, indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on. In addition, certain Marketing collateral may be added from time to time to promote Baltimore Technologies products, services, Global e-Security or appearance at trade shows and conferences. This footnote confirms that this email message has been swept by Baltimore MIMEsweeper for Content Security threats, including computer viruses.
Greg Wilson
How about a quick patch to do "%b" for int and long-int, and a PEP for a generic "format" module --- arbitrary radix, options for IEEE numbers, etc.? Any objections?
I like it. -- <a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a> The people cannot delegate to government the power to do anything which would be unlawful for them to do themselves. -- John Locke, "A Treatise Concerning Civil Government"
[Greg Wilson]
How about a quick patch to do "%b" for int and long-int,
Don't know how quick it will be (it should cover type slots and bin() and __bin__ and 0b1101 notation too, right?), but +1 from me. That much is routinely requested.
and a PEP for a generic "format" module --- arbitrary radix, options for IEEE numbers, etc.? Any objections?
None here.
participants (3)
-
Eric S. Raymond
-
Greg Wilson
-
Tim Peters