On Sunday 19.12.2010 22:26:26 Steven D'Aprano wrote:
Eike Welk wrote:
My positive attitude towards this syntax comes from the only weakness that Python IMHO has: You can't easily see which data attributes an instance has.
What's wrong with dir(obj) and vars(obj)?
I should have expressed it more clearly, I was referring to the source text. In the declaration of a class in C++ you can see the data attributes that its instances use. In a Python class you have to look at the "__init__" method, and possibly into other methods, to see which data attributes are used. It's much harder to get an overview over the data attributes in Python. Python's introspection features are off course great. Eike P.S.: In my last mail, I also wanted to express that "I like Ocaml's type system", not its "file system".