noob question: "TypeError" wrong number of args

Ben Finney bignose+hates-spam at benfinney.id.au
Wed May 3 17:46:17 EDT 2006


Edward Elliott <nobody at 127.0.0.1> writes:

> As long as we're trotting out aphorisms

The ones I quoted were from Python.

    >>> import this

> how about DRY: Don't Repeat Yourself.  The rule couldn't be clearer:
> don't repeat your SELF. ;) Yet that's exactly what explicitly
> declaring self does, forces me to needlessly repeat what everyone
> already knows: methods take the object instance as their first
> parameter.

You've misunderstood "don't repeat yourself". It advocates *one*
definition of any given thing in the code. You are advocating *zero*
definitions of 'self' in the code.

-- 
 \     "No wonder I'm all confused; one of my parents was a woman, the |
  `\                          other was a man."  -- Ashleigh Brilliant |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list