Python misconceptions in IBM Ruby article...

Moshe Zadka moshez at math.huji.ac.il
Fri Feb 18 19:28:52 CET 2000


On Fri, 18 Feb 2000 see_plus_plus at my-deja.com wrote:

> This is just a display that you haven't mastered C++.

You can tell that to my boss, who pays me to write C++.

> In your C++ code sample, you on purpose introduced two variables integer
> i. The one is the  private data member, and the other is the formal
> parameter of function member foo. 

Yes. And it's legal C++, and very common too: consider

class Foo {
	char data;
	Foo(char data) {this->data = data; }
};

> Just because of that you need to use
> 'this' to be explicit.

Exactly. Python requires you always to be explicit. 

--
Moshe Zadka <mzadka at geocities.com>. 
INTERNET: Learn what you know.
Share what you don't.





More information about the Python-list mailing list