[Python-Dev] Remove str.find in 3.0?

"Martin v. Löwis" martin at v.loewis.de
Sat Aug 27 12:35:30 CEST 2005


Wolfgang Lipp wrote:
> that's a bug! i had to *test* it to find out it's true! i've been writing
> code for *years* all in the understanding that dict.get(x) acts precisely
> like dict['x'] *except* you get a chance to define a default value.

Clearly, your understanding *all* these years *was* wrong. If you don't
specify *a* default value, *it* defaults to None.

Regards,
Martin

P.S. Emphasis mine :-)


More information about the Python-Dev mailing list