Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93903
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.047 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.00; 'matches': 0.07; 'type,': 0.07; 'api': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; '8bit%:32': 0.16; 'hashes': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Mapping': 0.16; 'subject:key': 0.16; 'wrote:': 0.16; 'algorithm': 0.20; 'keys': 0.22; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; "i'm": 0.30; 'implement': 0.32; 'problem': 0.33; 'mass': 0.33; 'so,': 0.35; 'court': 0.35; 'mapping': 0.35; 'asking': 0.35; 'according': 0.36; 'but': 0.36; 'instead': 0.36; 'to:addr:python- list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'protection': 0.60; 'different': 0.63; 'judge': 0.66; 'internet': 0.70; 'skip:\xe2 10': 0.70; '8bit%:16': 0.84; '_o__)': 0.84; 'application?': 0.84; 'deserves': 0.84; 'governmental': 0.84; 'received:125': 0.84; 'speech': 0.84; 'ethan': 0.91; 'furman': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ben Finney <ben+python@benfinney.id.au> |
| Subject | Re: Mapping, with sequence as key, wildcard and subsequence matching |
| Date | Thu, 16 Jul 2015 16:37:50 +1000 |
| References | <mailman.552.1437011478.3674.python-list@python.org> <55a72c8b$0$1671$c3e8da3$5496439d@news.astraweb.com> <85fv4oveb2.fsf@benfinney.id.au> <55A74FAC.4090807@stoneleaf.us> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | jigong.madmonks.org |
| X-Public-Key-ID | 0xAC128405 |
| X-Public-Key-Fingerprint | 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 |
| X-Public-Key-URL | http://www.benfinney.id.au/contact/bfinney-pubkey.asc |
| X-Post-From | Ben Finney <bignose+hates-spam@benfinney.id.au> |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
| Cancel-Lock | sha1:3iQ/XOLbFSAjfUpREXupic5HAMs= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.563.1437028680.3674.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1437028680 news.xs4all.nl 2940 [2001:888:2000:d::a6]:55699 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:93903 |
Show key headers only | View raw
Ethan Furman <ethan@stoneleaf.us> writes: > On 07/15/2015 10:53 PM, Ben Finney wrote: > > Are those the ‘__contains__’, ‘__getitem__’ methods? What actually > > is the API of a mapping type, that would need to be customised for > > this application? > > The problem is that potential key matches are found by hashes For the Python ‘dict’ type, yes. I already know that I don't want that type, I want a custom mapping type which matches keys according to the algorithm I specify. So, I'm not asking “how do I make ‘dict’ do this?”. I am instead asking “how do I implement a custom type which can duck-type for ‘dict’ but have a different key-lookup implementation?”. -- \ “As the most participatory form of mass speech yet developed, | `\ the Internet deserves the highest protection from governmental | _o__) intrusion.” —U.S. District Court Judge Dalzell | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Mapping, with sequence as key, wildcard and subsequence matching Ben Finney <ben+python@benfinney.id.au> - 2015-07-16 11:51 +1000
Re: Mapping, with sequence as key, wildcard and subsequence matching Steven D'Aprano <steve@pearwood.info> - 2015-07-16 14:01 +1000
Re: Mapping, with sequence as key, wildcard and subsequence matching Ben Finney <ben+python@benfinney.id.au> - 2015-07-16 15:53 +1000
Re: Mapping, with sequence as key, wildcard and subsequence matching Ethan Furman <ethan@stoneleaf.us> - 2015-07-15 23:31 -0700
Re: Mapping, with sequence as key, wildcard and subsequence matching Ben Finney <ben+python@benfinney.id.au> - 2015-07-16 16:37 +1000
Re: Mapping, with sequence as key, wildcard and subsequence matching Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-16 08:09 +0100
Re: Mapping, with sequence as key, wildcard and subsequence matching Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-16 08:24 +0100
Re: Mapping, with sequence as key, wildcard and subsequence matching Marko Rauhamaa <marko@pacujo.net> - 2015-07-16 09:53 +0300
csiph-web