Why does one work, but not the other?

j_mckitrick j_mckitrick at bigfoot.com
Fri Jun 18 12:26:08 CEST 2004

Thanks for the help, guys.  I found the problem.  The liststore cannot
be redefined once set up for the TreeView.  I can only clear/append to

But I'm still on my mission to replace 'for' with list comprehensions
where possible, according to the article on optimization on the python

That being said, is there a way to write this as a comprehension?  I
can't figure out how to do so and get k into the key correctly.  I'm
just trying to save a dictionary via anydbm.

            for k, v in self.options.items():
                db[k] = str(v)


More information about the Python-list mailing list