Hacker News new | past | comments | ask | show | jobs | submit login

As you've discovered, the reported property had a different name in python2. The repl doesn't report a property, it asks the object to give a representative string (__repr__() function) and prints that. Other languages wanting to expose something like this would maybe hide it deeper in the interpreter or build it into each tool separately, Python chooses to make everything accessible from the language itself.

You've bitten onto a more or less internal detail (I've TA'ed a bunch of undergrad courses in Python, and it's firmly in the land of things students don't know if they don't discover it on their own) and use that and seemingly quite little grasp of how Python works to argue that it isn't simple, while of course languages you are more familiar with are better.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: