On 1/18/06, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > I'd propose bin() to stay in line with the short abbreviated names. > > > > There has been some previous discussion about removing hex()/oct() > from > > builtins for Python 3.0, IIRC. I sure don't think bin() belongs > there. > > Perhaps introduce a single function, base(val, radix=10, prefix=''), as > a universal base converter that could replace bin(), hex(), oct(), etc. > > That would give us fewer builtins and provide an inverse for all the > int() conversions (i.e. arbitrary bases). Also, it would allow an > unprefixed output which is what I usually need. >
+1. Differs from Neal's format() function by not magically determining the prefix from the radix which I like. -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com