Pre-PEP: Dictionary accumulator methods

Do Re Mi chel La Si Do enleverlesO.OmcO at OmclaveauO.com
Sat Mar 19 12:21:48 EST 2005


Hi


    if key not in d:
        d[key] = {subkey:value}
    else:
        d[key][subkey] = value


and

        d[(key,subkey)] = value

?


Michel Claveau





More information about the Python-list mailing list