On 25/04/2018 –– 18:35:30PM +0100, Alan Gauld via Tutor wrote: > > ... > > for line in logfile: > > result = pattern.search(line) > Doesn't this overwrite your data structure? > I would strongly advise using another name.
You are of course right. I accidentally shortened this name as I was trying to fit my code into 80 characters width of this mail. That was sloppy ;) > However personally I'd use a class to define tyour data structure and > just have a top leveldictionary holding instances of the class. You are right (again). I haven't thougt of using classes, but that's exactly what they were invented for. Thanks for pointing that out. Thanks for the help! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor