Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105868 > unrolled thread
| Started by | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| First post | 2016-03-27 20:24 +0100 |
| Last post | 2016-03-27 20:24 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Suggestion: make sequence and map interfaces more similar Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-27 20:24 +0100
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2016-03-27 20:24 +0100 |
| Subject | Re: Suggestion: make sequence and map interfaces more similar |
| Message-ID | <mailman.93.1459106717.28225.python-list@python.org> |
On 27/03/2016 19:01, Marco S. via Python-list wrote: > > Mark Lawrence wrote: > >> I cannot see this happening unless you provide a patch on the bug >> tracker. However I suspect you can get the same thing by subclassing >> dict. Why don't you try it and let us know how you get on? > > The problem with a vdict is that I should also create by zero a new > interface (ABC), since MutableMapping have an incompatible contract. > And to be much more useful I should code it inc C, and my C skills are > not so magnificent. Furthermore I would try to create a new sequence > interface that inherit from the vdict interface. More briefly, I need > much free time. But I suppose I can start with something quick and > dirty. > Why do you need a new interace if all you're trying to do is create a vdict class that has "iter(d) == iter(d.values()), and should also have a count() method, like sequence types"? I don't understand why you think you need C skills. E.g. SortedContainers https://pypi.python.org/pypi/sortedcontainers "is an Apache2 licensed containers library, written in pure-Python, and fast as C-extensions." I think your quick and dirty might well turn into something useful for your application. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to top | Article view | comp.lang.python
csiph-web