noob question: "TypeError" wrong number of args

Ben Finney bignose+hates-spam at benfinney.id.au
Wed May 3 23:52:01 CEST 2006


Bruno Desthuilliers <bdesth.quelquechose at free.quelquepart.fr> writes:

> Ben Finney a écrit :
> > So now you're proposing that this be a special case when a
> > function is declared by that particular syntax, and it should be
> > different to when a function is created outside the class
> > definition and added as a method to the object at run-time.
> > 
> > Thus breaking not only "explicit is better than implicit",
> 
> This one can be subject to discussion.

All the assertions in 'import this' are subject to discussion. They're
even contradictory.

> > but also "special cases aren't special enough to break the rules".
> 
> Yeps, I think this is what I don't like here.
> 
> > Still -1.
> 
> I'm not yet ready to vote for Edward's proposition - as you say, it
> makes 'def statements into a class statement' a special case, and I
> don't like special cases too much (OTOH, there actually *are*
> special cases - __new__() being an example) - *but* it's not that
> silly either IMHO, and I think this should not be dismissed on a
> purely reactional basis.

My basis for rejecting the proposal is that it claims to offer net
simplicity, yet it breaks at least two of the admonishments that
simplify Python.

-- 
 \        "My house is made out of balsa wood, so when I want to scare |
  `\     the neighborhood kids I lift it over my head and tell them to |
_o__)  get out of my yard or I'll throw it at them."  -- Steven Wright |
Ben Finney




More information about the Python-list mailing list