Another Language Change for Debate

Huaiyu Zhu huaiyu at
Fri Jan 11 20:17:58 EST 2002

On Fri, 11 Jan 2002 13:21:34 -0500, Michael Chermside <mcherm at>
>So here's my idea. Allow the following syntax:
>class MyClass(OtherClass):
>    def self.addItems( newItems ):
>       self.items += newItems
>So... what do you folks think?

I like this a lot.  It looks natural.  In fact, I had on more than one
occassion typed this way without noticing it until a SyntaxError came up.
It reduces the amount of editing needed when doing copy-paste between usage
and implementation.

One minor problem is that the following might appear more cryptic (or maybe
not): TypeError: addItems() takes exactly 2 arguments (3 given).


More information about the Python-list mailing list