[Tutor] Question about dictionary method get()

Alan Gauld alan.gauld at blueyonder.co.uk
Mon Jun 28 18:40:03 EDT 2004


> How do I "check for or propagate" None?

foo = dct.get('x')
if foo is None:
   # do something here

HTH

Alan G



More information about the Tutor mailing list