oop - Python method that can be called on a list of objects -
when method called on object in python as:
obj.func()
then python passes obj
first argument func()
. want like:
[obj1, obj2].func()
and have processed as:
[obj1.func(), obj.func()]
is there way of defining kind of methods in python?
Comments
Post a Comment