[Python-Dev] Re: PendingDeprecationWarning
Wed, 29 May 2002 21:19:44 +0200
On Wednesday 29 May 2002 07:39 pm, François Pinard wrote:
> [Alex Martelli]
> > 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).
> The same kind of reason says that `str()' and `repr()' could be faded out
> in favour of `%s' and `%r' specifiers. This is not likely to happen! :-)
Having both repr AND the peculiar `...` operator is another one of those
things which I find _really_ hard to explain without handwaving and without
sounding negative about Python, a language about which I'm actually
enthusiastic. I'd rather lose the `...` (via pendingsilentdeprecation or
whatever). As to repr itself, I'd be +0 on taking it out of the builtins, but
that's hardly a major issue, nor of course a realistic prospect.
str is obviously quite a different kettle of fish -- it's a TYPE and thus it
cannot be substituted by whatever operator. It would also be the
natural way to put a format-with-whatever-number-base functionality
(2-arg str, just like parsing with arbitrary base is 2-arg int -- perfect!).