Tom Insam

More things I don't like about Python

I've played with python some more, and there are more things I don't like about it.

For objects, attributes and methods are called with the exact same syntax, the '.' character. So for an object 'foo', is the attribute (member variable) 'bar' of foo, and foo.baz() is a function call on the method 'baz' of the foo object. But if a foo object has an attribute 'bar' and a method 'bar', gets the attribute, and explodes, because an attribute isn't a function. I don't like that you can hide functions behind attributes.

More object stuff - there's no abstract 'call my superclass method' calling convention. You have to either explicitly call a class method on your superclass (calling it by name, so changing your superclass would be Pain) and passing 'self' as the first parameter, or you use the magic 'super' method, which requires you to pass your class explicitly, also meaning Pain if you rename things. Hello? self.super? Sigh.

Incidentally, there are plenty of things about python I'm really liking - it's not all pain. But people don't blog about things that they like, they blog about things that annoy them. Human nature - deal with it.