Class or Dictionary?

Andrea Crotti andrea.crotti.0 at
Fri Feb 11 20:27:40 CET 2011

Il giorno 11/feb/2011, alle ore 19.47, Ethan Furman ha scritto:

> I strongly disagree.  Code readability is one of the most important issues.

Perfectly agree with that, but = x
obj.surname = y

obj['name'] = x
obj['surname'] = y

are both quite readable in my opinion.
Other things are more important to evaluate in this case.

I normally always wrap dictionaries because before or later I'll want to add some other
features, but I don't know if that's the  case here.

More information about the Python-list mailing list