Appliying method to list of objects

Duncan Booth duncan at NOSPAMrcp.co.uk
Thu May 31 10:30:33 EDT 2001


eloy <eloy at rabinf50.uco.es> wrote in 
news:Pine.LNX.4.33.0105311550510.22754-100000 at eloy.ayrna.org:

> I couldn't find a cannonical (ti!mtowtdi) and efficient way to improve
> this:
> 
>      for i in list:
>           i.dosomething()
> 

I'm not sure I understand what you feel needs improvement here. It looks 
clear and understandable which is the primary consideration when writing 
any code.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list