On Wednesday 29 May 2002 06:42 pm, Guido van Rossum wrote: ... > > oct() > > hex() > > Why? I use these a lot... I assume the duplication of oct and hex wrt '%o'% and '%x'% was the reason to suggest silently-deprecating the former (trying to have 'just one obvious way' and all that). Personally, what seems weird to me is that we have a way to _parse_ numbers in any base (thanks to the 2-args form of str) but not one to _emit_ them in any base -- an issue of asymmetry more than anything else (binary is probably the only format besides oct and hex that would see significant use -- as I would guess may be the case for 2-arguments str today). The % operator is probably a bit too obscure / unreadable to consider it a general substitute for oct and hex, alas. Just MHO of course. Alex
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