[Python-ideas] Dict with inverse form

João Bernardo jbvsmo at gmail.com
Thu Feb 11 21:36:15 EST 2016


On Fri, Feb 12, 2016 at 12:18 AM, Chris Angelico <rosuav at gmail.com> wrote:
>
> Sounds like what you're looking for is a view, rather than an
> additional concrete dictionary.


If the view offers the same O(1) complexity on amortized case, then it is
OK.
For the typical use in my experience (small dictionaries and several
accesses) space is not a concern, so really adding a concrete dictionary
like I've been doing is also fine.

João Bernardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160212/fabee442/attachment-0001.html>


More information about the Python-ideas mailing list