A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2008-June/080619.html below:

[Python-Dev] Implmentation details for bin/oct/hex

[Python-Dev] Implmentation details for bin/oct/hex [Python-Dev] Implmentation details for bin/oct/hexRaymond Hettinger python at rcn.com
Tue Jun 24 15:56:37 CEST 2008
From: "Nick Coghlan" <ncoghlan at gmail.com>
> The 3.0 approach means that non-float floating point types still can't be displayed properly by bin()/oct()/hex(). The current 2.6 
> approach means every such class has to implement its own equivalent of PyNumber_ToBase.

Feel free to change the implementation details however you like as long as the basic functionality stays the same.  To support 
non-float floating point types, replace the float check with isinstance(v, real).  The rest of PyNumber_ToBase looks fine to me 
since it supports anything with an __index__ method.

Raymond







More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4