Appliying method to list of objects

Alex new_name at mit.edu
Thu May 31 10:15:27 EDT 2001


You could do this in python2:

[x.dosomething() for x in list]

To use apply, you want to do something like:

map(apply, map(getattr, list, len(list) * ['dosomething']))

HTH.
Alex.



More information about the Python-list mailing list