anomaly

Gary Herron gherron at digipen.edu
Tue May 12 12:07:29 EDT 2015


On 05/12/2015 04:55 AM, Antoon Pardon wrote:
> Op 11-05-15 om 16:13 schreef Chris Angelico:
>
>> Why does Python have most built-ins as simply looked-up names that can
>> be overridden? Because otherwise, there would be a veritable ton of
>> keywords:
> But that doesn't answer the question why the developers chose "True" to be a
> keyword and "int" to be a looked-up name.
>
> and pretending to justify that choice by stating that the python thought
> is: We're all adults here, if you want to override a builtin, who are we
> to stop you. That is disingenuous.
>

Bull.   Some design decisions were made with the knowledge that

  * they provide a freedom which may be useful but can be misused (e.g.,
    shadowing builtins), versus
  * they would be too disruptive of abusable (e.g. shadowing keywords)

Python tends to use the first category more than C family languages, and 
that's where the "We're all adults" argument applies.  You may argue 
about which category any particular feature ought to fall into, and in 
fact several things (shadowing None, True, and False) have changed 
category during the evolution of Python.  But to imply that the "adult" 
argument should drive *all* decisions is foolish. And disingenuous.

-- 
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150512/99d6941e/attachment.html>


More information about the Python-list mailing list