[issue40342] Programming FAQ about "How do I apply a method to a sequence of objects?" should include the option of an explicit for-loop

Mark Dickinson report at bugs.python.org
Wed Apr 22 02:54:42 EDT 2020


Mark Dickinson <dickinsm at gmail.com> added the comment:

However, the list comprehension pattern is not as bad as lines like this one [#1]:

    map(lambda plugin: self.start_plugin(plugin), self._plugins)

... which of course stopped working as soon as we transitioned to Python 3. :-(


[#1] https://github.com/enthought/envisage/blob/b7adb8793336dd3859623cb89bcc7bdfefe91b29/enthought/envisage/plugin_manager.py#L105

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40342>
_______________________________________


More information about the Python-bugs-list mailing list