noob question: "TypeError" wrong number of args
Ben Finney
bignose+hates-spam at benfinney.id.au
Tue May 2 19:34:35 EDT 2006
Edward Elliott <nobody at 127.0.0.1> writes:
> bruno at modulix wrote:
> > class MyObj(object):
> > def __init__(self, name):
> > self.name = name
>
> class MyObj(object):
> def __init__(name):
> self.name = name
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
signature?"
against
- 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?"
I don't see a net gain by going with the latter.
-1.
--
\ "Those who will not reason, are bigots, those who cannot, are |
`\ fools, and those who dare not, are slaves." -- "Lord" George |
_o__) Gordon Noel Byron |
Ben Finney
More information about the Python-list
mailing list