mapping the read() fonction

Benjamin benjamin.sauthier at worldonline.fr
Mon Jul 24 13:08:01 EDT 2000


I would like to map the read() function of a file object

I have a list of file objects. I want to return the list of their content
using the map function

I've used the map function to open my list of file
    map(open,list,{"r","r","r"})  (to open a list of 3 files for example)

but I can't do the same for the read() function, because it is a method
function of the file class
How can I map the read() fonction to my list of file? The problem is that I
don't know the class name of a file object.

The only solution for the moment id to use a for loop on my list....


Thanks

Ben





More information about the Python-list mailing list