A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20151028/455824ef/attachment.html below:

<div dir="ltr">Dear Python-Dev,<div><br></div><div>I am the author of bidict, a bidirectional map implementation for Python. A user recently filed a bug that bidict should be a subclass of dict, so that isinstance(mybidict, dict) would return True. I replied that the user should instead use isinstance(mybidict, collections.abc.Mapping), which does already return True, and is more polymorphic to boot.</div><div><br></div><div>But before I put the issue to bed, I want to make sure I'm correctly understanding the intended usage of collections.abc, as well as any relevant interfaces I'm not currently using (collections.UserDict? __subclasshook__?), since the documentation leaves me with some doubt. Could any collections experts on this list please confirm whether bidict is implemented as the language intends it should be?</div><div><br></div><div>Some quick references:</div><div><a href="https://bidict.readthedocs.org/en/latest/other-bidict-types.html#bidict-type-hierarchy">https://bidict.readthedocs.org/en/latest/other-bidict-types.html#bidict-type-hierarchy</a><br></div><div><a href="https://github.com/jab/bidict/blob/master/bidict/_bidict.py">https://github.com/jab/bidict/blob/master/bidict/_bidict.py</a><br></div><div><br></div><div>I would be happy to try to capture what I learn from this thread and write up a guide for collections library authors in the future, or otherwise pay your help forward however I can.</div><div><br></div><div>Thanks and best wishes.</div><div><br></div><div>-jab</div></div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4