special_dragonfly <[EMAIL PROTECTED]> wrote:
> if key in FieldsDictionary:
> FieldsDictionary[key].append(FieldClass(*line.split(",")))
> else:
> FieldsDictionary[key]=[FieldClass(*line.split(","))]
These four lines can be replaced by:
FieldsDictionary.setdefault(key, []).append(FieldClass(*line.split(",")))
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
--
http://mail.python.org/mailman/listinfo/python-list