noob question: "TypeError" wrong number of args
nobody at 127.0.0.1
Wed May 3 02:55:04 CEST 2006
Ben Finney wrote:
> So the tradeoff you propose is:
> - Honour "explicit is better than implicit", but users are confused
> over "why do I need to declare the instance in the method
> - Break "explicit is better than implicit", take away some of the
> flexibility in Python, and users are confused over "where the heck
> did this 'self' thing come from?" or "how the heck do I refer to
> the instance object?"
1. it removes zero flexibility (everything works as before)
2. it's no more confusing than "where did this len/count/dir/type/str/any
other builtin thing come from?"
3. learning "how do i access this instance object" is certainly no harder or
less intuitive than learning "how do i initialize this instance object?"
> I don't see a net gain by going with the latter.
Ok. Would you care to explain in more detail?
More information about the Python-list