I find myself doing the following very often:

class Struct:
        pass
...
blah = Struct()
blah.some_field = x
blah.other_field = y
...

Is there a better way to do this?  Is this considered bad programming
practice?  I don't like using tuples (or lists) because I'd rather use
symbolic names, rather than numeric subscripts.  Also, I don't like having
to declare the empty Struct class everytime I want to do this (which is
very often).

Feedback is appreciated, thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to