curly-brace-aphobic?

Grant Griffin not.this at seebelow.org
Tue Jan 30 22:16:01 EST 2001


Thomas Wouters wrote:
> 
> On Mon, Jan 29, 2001 at 10:07:49PM +0000, Rainer Deyke wrote:
> 
> > None of these is really a compelling reason for using '[]' instead of '()'
> > for access.
> 
> I think the central misconception here is that you seem to think Guido made
> a concious decision about everything he did in Python. I think Python uses
> [] for all indexing operations, and not some other character, because Guido
> thought it made sense. And you know what ? So do I, and a lot of other
> people. I *especially* like the way indexing is handled the same way for all
> container types, because that makes the language consistent, and doesn't
> leave you with a feeling of "what do I do when I have a class/extention type
> that is neither a dict nor a list, and I want to index it?" :)
> 
> Other than that, I doubt Guido thought much about what to use for indexing.
> He probably also didn't think much of using ()'s for all function-alike
> calls -- builtin functions, Python functions, methods on builtin types,
> methods on Python types, class instantiation, Python classes pretending to
> be functions. Not everything has a concious reason, Guido just made the
> right decisions automatically :)
> 
> I'm-an-atheist-so-I'll-call-it-'coincidence'-ly y'rs,

Good points.

I'm sure that Guido does it more often and more consistently, but on
some of my very best days, I, too, sometimes deliberately choose the
right design without knowing exactly why.

but-let's-just-call-it-a-'zen'-thing-<wink>-ly y'rs,

=g2
-- 
_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com



More information about the Python-list mailing list