Is there a short-circuiting dictionary "get" method?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Wed Mar 9 19:05:21 CET 2005


Maybe this can help:

value = d.get('x', lambda: bigscaryfunction())

Bearophile




More information about the Python-list mailing list