Question about math.pi is mutable

Ben Finney ben+python at benfinney.id.au
Mon Nov 9 18:29:59 EST 2015


Antoon Pardon <antoon.pardon at rece.vub.ac.be> writes:

> Op 07-11-15 om 04:43 schreef Ben Finney:
> > Python assumes the programmers using it are consenting adults. Doing
> > harmful things is difficult but not forbidden.
>
> I find that to be contradictory. Why should you make something difficult
> if you are consenting adults?

It's no more contradictory than the fact Python makes it difficult for
consenting adults to exchange hard-to-follow code indentation. The
principle that There Should Be (Preferably Only) One Obvious Way To Do
It directly implies that other ways should be difficult. That's not a
contradiction with treating Python programmers as consenting adults.

> This whole idea of python assuming we are consenting adults and thus
> making it impossible to not consent seems weird.

You misunderstand the implication: I'm saying that because Python
assumes we are consenting adults, that such actions remain possible.

> > Notably, the author of a library should not be forbidding the Pythonic
> > ability to change name bindings as needed.
>
> If the author of a library doesn't wish to consent to this I don't see
> what is wrong with that.

Who is doing what to whom? The user of the library isn't doing anything
to the library author, so what is it the library author would consent
to? Instead, you seem to be trying to assert a *power* of the library
author to restrict the library user. Such a power is not granted by
Python.

Instead, the library author is obliged to treat the library user as an
adult who consents to the freedoms inherent to Python's design, and to
not restrict their use of the library needlessly.

-- 
 \     “Facts are stubborn things; and whatever may be our wishes, our |
  `\   inclinations, or the dictates of our passion, they cannot alter |
_o__)        the state of facts and evidence.” —John Adams, 1770-12-04 |
Ben Finney




More information about the Python-list mailing list