[Python-Dev] str with base (original) (raw)
Steven Bethard steven.bethard at gmail.com
Wed Jan 18 17:55:49 CET 2006
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Raymond]
Perhaps introduce a single function, base(val, radix=10, prefix=''), as a universal base converter that could replace bin(), hex(), oct(), etc.
+1 on introducing base()
[Skip]
Would it (should it) work with floats, decimals, complexes? I presume it would work with ints and longs.
While support for floats, decimals, etc. might be nice (and I certainly wouldn't complain if someone wanted to supply the patch) I don't think those features should be necessary for base()'s initial introduction. If they're there, great, but if not, I don't think that should hold up the patch...
STeVe
You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]