No trees in the stdlib?
João Valverde
backup95 at netcabo.pt
Fri Jun 26 03:49:45 EDT 2009
Stefan Behnel wrote:
> João Valverde wrote:
>
>> Besides some interface glitches, like returning None
>> on delete if I recall correctly.
>>
>
> That's actually not /that/ uncommon. Operations that change an object are
> not (side-effect free) functions, so it's just purity if they do not have a
> return value.
>
> Although practicality beats purity, sometimes... ;)
>
> Stefan
>
I didn't know that. But in this case I think purity gets pummeled every
time :) It's still not making sense to force a lookup to fetch something
before deleting (another lookup operation). If that were imposed by
python's internal machinery I'd suggest fixing that instead.
More information about the Python-list
mailing list