Comment on draft PEP for deprecating six builtins
Roman Neuhauser
neuhauser at mail.cz
Mon Apr 29 08:49:12 EDT 2002
> From: Alex Martelli <aleax at aleax.it>
> Subject: Re: Comment on draft PEP for deprecating six builtins
> To: python-list at python.org
> Date: Mon, 29 Apr 2002 07:01:59 GMT
> Raymond Hettinger wrote:
> Take, for example, 'apply'. What need does it serve, ever since the
> forms *args and **kwds started applying to actual arguments (i.e., at
> function-call time) as well as to formal arguments (i.e., at function
> definition time)? I.e., since 2.0 (or 1.6, I don't recall). Indeed
> that would have been my first candidate for built-in deprecation (also
> for alphabetical reasons:-).
>
> abs, buffer, chr, cmp, coerce, id, intern, oct, ord, are a few others
> that might be worth thinking about in terms of frequency of need --
> they're all needed some of the time, of course, but how often? Often
> enough to be warranted as built-ins? I surely use, e.g., map, more
> often than, e.g., cmp, coerce, or id. Not to mention intern. So why
> should map go away and the others remain? This is not meant to be a
> rhetorical question, but to prompt active reflection/discussion/study.
__builtin__.chr(int) -> int.chr()
__builtin__.abs(int) -> int.abs()
__builtin__.ord(str) -> str.ord()
etc
There's quite a few places in python that break the POLA rule, and
the seemingly randomly chosen builtins are a prominent example.
--
FreeBSD 4.4-STABLE
2:43PM up 5:09, 6 users, load averages: 0.01, 0.10, 0.21
More information about the Python-list
mailing list