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

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Wed Mar 9 13:05:21 EST 2005


Maybe this can help:

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

Bearophile




More information about the Python-list mailing list