default behavior

John Posner jjposner at optimum.net
Tue Aug 3 18:04:27 EDT 2010


On 8/3/2010 5:47 PM, Christian Heimes wrote:
>> So I'd rather not mention __missing__ in the first paragraph, which
>> describes the functionality provided *by* the defaultdict class. How
>> about adding this para at the end:
>>
>>    defaultdict is defined using functionality that is available to *any*
>>    subclass of dict: a missing-key lookup automatically causes the
>>    subclass's __missing__ method to be called, with the non-existent key
>>    as its argument. The method's return value becomes the result of the
>>    lookup.
>
> Your proposal sounds like a good idea.

Tx.

> By the way do you have a CS degree? Your wording sounds like you are
> used write theses on a CS degree level. No offense. ;)

No CS degree (coulda, woulda, shoulda). I think what you're hearing is 
30+ years of tech writing for computer software companies.

-John



More information about the Python-list mailing list