noob question: "TypeError" wrong number of args

Edward Elliott nobody at 127.0.0.1
Wed May 3 18:29:02 EDT 2006


Ben Finney wrote:
> 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

Yes I know where it's from.

> 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.
 
It's implicitly defined by the language/runtime, so I shouldn't need to
define it in my code.  Doing so is duplication of effort, aka DRY.  An
implicit definition is not an empty definition.  Where do the semantics of
'while' and 'for' come from?  Same thing, it's implicit in the language.




More information about the Python-list mailing list