How to decide when to introduce a new type instead of using list or tuple?
<p>I like to do some silly stuff with python like solving programming puzzles, writing small scripts etc. Each time at a certain point I'm facing a dilemma whether I should create a new class to represent my data or just use quick and dirty and go with all values packed in a list or tuple. Due to extreme laziness and personal dislike of <code>self</code> keyword I usually go with the second option. </p>

<p>I understand than in the long run user defined data type is better because <code>path.min_cost</code> and <code>point.x, point.y</code> is much more expressive than <code>path[2]</code> and <code>point[0], point[1]</code>. But when I just need to return  multiple things from a function it strikes me as too much work.</p>

<p>So my question is what is the good rule of thumb for choosing when to create user defined data type and when to go with a list or tuple? Or maybe there is a neat pythonic way I'm not aware of?</p>

<p>Thanks.</p>
