No trees in the stdlib?
pavlovevidence at gmail.com
Fri Jun 26 15:32:59 EDT 2009
On Jun 26, 7:35 am, Hallvard B Furuseth <h.b.furus... at usit.uio.no>
> Stefan Behnel writes:
> >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.
> It's purity that they don't return the modified tree/dict/whatever.
> They can still return the deleted element and remain pure.
Correct, dict.pop does exactly this.
More information about the Python-list