I don't see a point in doing that in a subclass, since you only need
to hash so rarely.

On Fri, Oct 14, 2011 at 11:44 PM, Edward K. Ream <[email protected]> wrote:
> On Fri, Oct 14, 2011 at 2:18 PM, Ville M. Vainio <[email protected]> wrote:
>> Better use id (it) instead of just 'it' then
>
> Ah.  I tried it = id(widget_constructor), but that messes up it.
> Instead, as you suggest, using id(it) as *only* the key should work.
>
> Actually, the widget is a subclass already, so adding a __hash__
> method that returns id(self) should also work.
>
> EKR
>
> --
> You received this message because you are subscribed to the Google Groups 
> "leo-editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/leo-editor?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to