Idiosyncratic python

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Sep 24 02:02:15 EDT 2015


I was looking at an in-house code base today, and the author seems to have a 
rather idiosyncratic approach to Python. For example:


for k, v in mydict.items(): 
    del(k)
    ...


instead of the more obvious

for v in mydict.values(): 
    ...



What are your favorite not-wrong-just-weird Python moments?



-- 
Steve




More information about the Python-list mailing list