2D array

Adam DePrince adam at cognitcorp.com
Fri Dec 10 20:51:38 CET 2004

On Wed, 2004-12-08 at 16:22, Steven Bethard wrote:
> Adam DePrince wrote:
> > The use of  None as the default parameter was on purpose; the lack of
> > "magic" in python is often cited in religious wars between python and
> > perl aficionados.  Use of get(something, None) was on purpose, the level
> > of familiarity with the language implied by the original question
> > suggested that the notion of optional parameters, and specifically those
> > of get, may not have been immediately obvious.
> > 
> > As for a[0,0] instead of a[(0,0)] ... the former just *looks* so
> > aesthetically wrong to me that I've never used it, and had forgotten
> > that it was even possible.   
> Sorry, I hadn't meant any of my comments as criticisms -- just wanted to 
> make sure the OP knew about all the options open to them.  I'm used to 
> a[0,0] because I've used numarray a bit, but to each his own, of course. =)

Even if you were, there is certainly no need to apologize.  In
hindsight, my response seems rather naive; as naive perhaps as the
students in my freshman year undergrad C class who having grown up on
Turbo pascal would add to their programs:

#define BEGIN {
#define END {

because it "looked right." 

Adam DePrince 

More information about the Python-list mailing list