Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

YOU CHOOSE!

Name: Anonymous 2006-04-11 0:48

Java... or Python?

Name: Anonymous 2006-04-11 9:56

>>14
Yes, it seems to perform slightly better.

>>16
self is good. It makes functions and methods interchangeable, and allows you to have local variables of the same name within the method (which I wouldn't recommend though). The __underscores__ are a bit too much (2 of them was enough, either _x_ or __x, or another character like ?x), but it's a very minor annoyance; in fact I'm far more annoyed at the lack of a safe ?: operator or do..while constructs. len is not a method but a builtin function which can be overloaded. You can also consider it an operator. And you can call it like x.__len__() if you want, although you won't like the underscores. join is actually str.join("/", array), just as in other languages. It just happens that because of Python's self, you can also use it as a method. Method or function, in Python it's your choice.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List