[Tutor] Overloaded Brackets

Emile van Sebille emile at fenx.com
Sat Aug 21 01:13:30 CEST 2010

Hi All,

I just had reason the write the following:

itemCodes = [UPCxref['0'+xx[:10]][0] for xx in itemUPCs]

... and it occurred to me exactly how overloaded square brackets are.

This is certainly not something you want to see as a beginning python 
programmer, but I thought it might be an interesting example to parse.



More information about the Tutor mailing list