typetesting, adaptation, typeclasses, ... (was Re: isinstance() considered harmful)

Jason Orendorff jason at jorendorff.com
Fri Feb 1 21:43:35 EST 2002


Aahz wrote:
> Jason Orendorff wrote:
> > Alex Martelli wrote:
> > > 
> > > Refusing to guess in presence of ambiguity is one of Python's
> > > tenets, though.
> >
> > It's the language that doesn't guess.  The language designer is
> > notorious for picking one thing, seemingly arbitrarily, from a number
> > of reasonable alternatives.
>
> Mind expanding that?  (I could guess, but I don't want to flame you
> until I know for sure what you're saying. ;-)

Oh, I don't remember the context exactly.  It had to do with how
useful the recursive quality of typeclasses is.

My point was that when the BDFL has to choose between a number
of reasonable alternatives, he often picks one without seriously
trying to justify the choice.  (Hence "BDFL pronouncements"
in many PEPs: 201, 202, 223, 255...)  In PEP 255:  "No argument
on either side is totally convincing, so I have consulted my
language designer's intuition."

Or if you prefer: in the role of designing Python's behavior in
the presence of ambiguous input, the BDFL prefers to have Python
throw exceptions.  But when the BDFL himself is presented with
ambiguous input (or internal ambivalence), he (often enough)
makes a decision and moves on.

Flame away...  :)

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list