[Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.26

Chris Withers chrisw@nipltd.com
Sun, 10 Mar 2002 12:57:40 +0000


Shane Hathaway wrote:
> 
> That sounds like it'll work, but it only removes a certain kind of
> duplicates.  The code in that place was intended to be replaced with
> something that really knew how to remove duplicates, but it's hard to
> define "duplicate action" other than in the very narrow sense of
> comparing by identity.

...or equality, they're only dictionaries at that point afterall ;-)

> So that code is probably good but I'd hope to
> see a different comment next to it, to the effect of "remove actions
> that are obviously duplicated based on simple identity, but don't try to
> remove all duplicates".

See new comment ;-) I even provided an alternative bit of code, but it's slower
& Python 2.1 specific, so I left the identity check in for now.

cheers,

Chris