Deposing Dictators

Tim Peters tim.one at home.com
Wed Aug 1 21:31:50 CEST 2001


[Alex Martelli]
> Right.  Guido's forte is doing the right thing, as opposed to
> rationalizing WHY it's right.  I'd rather have the right
> thing, with weak rationale, than a botch that's rationalized
> to perfection (which is what would happen if _I_ were the
> BDFL, perish the thought).

[Arthur_Siegel at rsmi.com]
> This is where I started.  Not sure it is where I end up.
>
> Read his last post on the Changing the Division Operator
> thread.
>
> He takes zero responsibility.

Regardless of what you got out of what you read, in reality Guido takes full
responsibility for every Python decision.  That comes with being BDFL.
Something that also comes with being BDFL is taking responsibility for
repairing design errors, and if you think Guido has been *enjoying* this
flamefest, you're nuts.  Repairing mistakes is difficult under the best of
conditions.

> Its all a matter of correcting Tim's bad design advice (was that
> actually in a thread ?, I only saw reference to it), Moshe's bad PEP,
> misreprentations of his own clear words and intentions, usenet folk,
> etc.

They're all factors.  I don't actually remember giving "Tim's bad design
advice" in this case <wink>, but I believe him when he said it was my idea
for ints to auto-coerce to floats.  If Guido were to claim he didn't push
back on that at all, I'd believe that too -- it was a decade ago, and I may
well have been the only Python user in the world making significant use of
floats at the time!

This all occurred in email before comp.lang.python existed, and indeed
before there was even a Python mailing list.  Guido and I had both used ABC
(he was an ABC implementer, and I an end user), and agreed early on that
ABC's use of rationals hadn't worked out at all in practice.  The only other
realistic choice at the time (Python was a one-man spare-time effort then)
for non-integer values was C doubles.  So it was a "double or nothing" kind
of bet <wink>.  *Given* that, while I'm not generally a fan of
auto-coercion, stuff like

    x = i*y + j*z  # i and j int, y and z float

is too common and harmless in fp apps to endure having to explicitly float
the ints all the time, so a general "ints auto-coerce to floats" rule was
natural.  I still don't regret that.  It should not have been hard to see
that

    x = y / z

could become a problem if "/" mapped to non-float division for ints, but it
didn't occur to either of us at the time.

One change made then nobody has noticed:  Python originally used
1's-complement notation for unbounded longs, which made a conceptual mess
out of switching between short (2's-comp) and long (1's-comp) ints in
bit-fiddling contexts.  IIRC, we argued more about that than about all other
numeric issues combined.

Anyway, having given up early on rationals, what 2/3 should return was "a
problem".  It didn't get much thought on my end, and I don't think on
Guido's either -- we were both full-time C programmers at the time (plus
some Fortran for me, as I was implementing Fortran compilers at the time and
had to test them <wink>), and "what the heck, return an int" is about all I
recall.  We argued much more about what -2/3 should return, as it "was
obvious" to me that i%j returning a value with the sign of j was much more
useful in real life than having it return a value with the sign of i, and
preserving the identity

    (i/j)*j + i%j == i

then implied i/j should return the floor.  Guido agreed "in theory" but was
reluctant to-- having just decided to copy C on 2/3 --break with the Fortran
and *most* C implementations' -2/3 == 0 result.  Deciding to switch longs
from 1's-comp to 2's-comp notation had a serendipitous influence, as under
the latter the identity

    i / 2**j == i >> j  # i long; j >= 0

only holds if int division returns the floor.  That, and some real-life
examples of how floor division simplified apps slinging modular arithmetic,
settled that issue, and I'm sure neither of us regrets that one either.

The division decision was a poor one, though!  While it's Guido's
responsibility for accepting it in the end, you seem a lot more interested
in *blaming* someone.  Then I should get about half the blame.  Blame away,
but I owned up to this years ago (so did Guido, you know), and public
displays of wailing and teeth-gnashing get old very fast <wink>.  Let's move
on.

> Kind of hopeless.

I don't know what you want, Arthur.  Guido doesn't actually have a time
machine, and he's not actually a dictator, and the world isn't actually
perfect in every respect, and Guido's not actually gutless enough to let a
design error stand forever just to avoid getting flamed.

> I've stopped needing to like him.

What does affection have to do with any of this?

guido-loves-me-this-i-know-
    for-the-ref-man-tells-me-so-
    little-ones-to-him-belong-
    they-are-weak-but-he-is-strong-ly y'rs  - tim





More information about the Python-list mailing list