Newbie: question regarding references and class relationships

Rui Maciel rui.maciel at gmail.com
Mon Jun 10 16:09:51 EDT 2013


Terry Jan Reedy wrote:

> On 6/10/2013 9:18 AM, Rui Maciel wrote:
> 
>> class Model:
>>          points = []
>>          lines = []
> 
> Unless you actually need keep the points and lines ordered by entry
> order, or expect to keep sorting them by whatever, sets may be better
> than lists. Testing that a point or line is in the model will be faster,
> as will deleting one by its identify.

Thanks for the tip, Terry.  Sounds great.  I'll update my code.


Once again, thanks for the help,
Rui Maciel



More information about the Python-list mailing list