On 12/4/2009 11:44 AM, Rhodri James wrote:
map(self.__choices, choicesBox.addItem)

or

[choicesBox.addItem(choice) for choice in self.__choices]

Aside from being pythonic or non-pythonic, using map or list comprehension with a method with side-effect is not the intention of functional programming; which strives to eliminates side-effect altogether. So it's unfunctional.

The only pythonic form to use method with side effect is an explicit for.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to