Giampaolo Rodolà wrote:

"unbound method echo() must be called with A instance as first
argument (got nothing instead)"

It talks about "arguments" while no arguments are actually involved in
the problem: just a class I forgot to initialize.

It's hard to see how this could be improved. If you had been
intending to call an unbound method, the comment about arguments
would have been relevant -- you were supposed to supply one
but didn't. Python is unable to read your mind and figure out
that you really meant something else altogether.

BTW, unbound methods no longer exist in Py3, so you would get
the standard message about incorrect number of arguments
instead. Not sure whether that's better or worse in this
situation.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to