[Tutor] Question about dictionary method get()

Dick Moores rdm at rcblue.com
Mon Jun 28 08:34:34 EDT 2004

Francis Moore wrote at 05:07 6/28/2004:

>There's a good explanation of the dictionary get() method in Recipe 1.3
>the O'Reilly Python Cookbook. There's a .pdf sample chapter at the
>following URL with this recipe in which you can download:
>It can probably explain it better than I can ;-)


Wow, what a great resource! Yes, 1.3 is an understandable explanation, 
"If you call d.get(x), no exception is thrown: you get d[x] if x is a key 
in d, and if it's not, you get None (which you can check for or propagate)."

How do I "check for or propagate" None?

Sorry for the basic questions.


Dick Moores

More information about the Tutor mailing list