I’ve been coding Python for most of the day. Well, in between housekeeping duties. I have a vague sense that my love of Python has reached a plateau. What bothers me most is that the data model is quite complicated. The distinction between sets, frozensets, tuples, and lists leads to a lot of ugly code, such as s = tuple([tuple()]). I suppose I could have written s = ((),) which is not much better. In other places, though, I have to throw values around from type to another. It is a pity that sets and lists are not hashable, otherwise I wouldn’t be mucking with all these types. Oh well, perhaps any language that is sufficiently powerful is going to contain such problems. Perhaps I, too, have some pettiness to expiate.
I must admit that Python makes it much easier to implement high-level algorithms in a semi-readable way. I don’t really see myself writing long programs in Python: I use it mostly for prototyping. And there are many cases where I would rather turn to awk or perhaps even PHP.
I’ve been wondering about the hashability and why it is so. The identifier for a list could, in theory, contain a constant hash value, generated when the object is generated. I wonder why this is not so.
I wanted to respond to your question here, but I thought it better to write an entire post about it.