Or a new string formatting character bin() == "%b" % (i), but perhaps
not, here is no precedent for this not even in C. Like you say a new
method in a lib somewhere is more reasonable. Mike Talin wrote: Mike Traynar <mike_traynar <at> credence.com> writes:I've always wondered why there isn't a bin() built-in in Python. Built-in functions already exist for converting ints to hexadecimal and octal strings and vice versa i.e.Perhaps a "format_base" function in the strings library, that takes an int and a number base? (The name is horrid, I know.)-- Talin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/mike_traynar%40credence.com |
_______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com