This commit is contained in:
Andrew M. Kuchling 2006-12-22 00:50:56 +00:00
parent d5624cf6c9
commit eabc0e87af

View file

@ -44,7 +44,7 @@ Uniquification
d.setdefault(word, []).append(pagenumber)
Note, the second example is a use case characterized by a get and set
to the same key. There are similar used cases with a __contains__
to the same key. There are similar use cases with a __contains__
followed by a get, set, or del to the same key. Part of the
justification for d.setdefault is combining the two lookups into one.