In <[EMAIL PROTECTED]>, bearophileHUGS
wrote:

> I have implemented yet another Odict class:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498195
> It's very slow, but it is O(1) for get, set and del too.
> 
> I have added ritervalues(), rkeys(), etc methods because I presume I
> can't use the reversed(). So can an __riter__ hook be generally useful?
> (I have seen few comments about it in the discussion regarding PEP
> 322).

I don't know if this is documented somewhere but the `reversed()` function
looks for a `__reversed__()` method that returns an iterator.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to