Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73760

Re: Creating a dict-like class that counts successful and failed key matches

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@bdurham.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:internal': 0.09; 'python': 0.11; 'dict': 0.16; 'from:addr:python': 0.16; 'general.': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subclassing': 0.16; 'subject: \n ': 0.16; 'subject:class': 0.16; 'subject:failed': 0.16; 'subject:key': 0.16; 'tuples,': 0.16; 'issue.': 0.22; 'issue,': 0.24; 'subject:like': 0.24; "haven't": 0.24; 'header:In- Reply-To:1': 0.27; 'subject:that': 0.31; 'class': 0.32; 'implemented': 0.33; 'received:66': 0.35; 'but': 0.35; 'thanks': 0.36; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'from:no real name:2**0': 0.61; 'header:Message-Id:1': 0.63; 'more': 0.64; 'behavior': 0.77; 'dict,': 0.84; 'ethan,': 0.84; 'played': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=bdurham.com; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= aqtX2tLtRIHz1U1nWqtiZXDvbXE=; b=T0bUvyoCm7tFx4H+zU4trAvoAgqyI3iA soWJ9qausPgsnR/N4jCUG3cOaEw+wWM+/Ei42pnQfvyp/lZFQud4VXpDHL//TUT7 yCUyvIfWQMW0V71iK5z6DkQ20xOxMnZ72cosglMxaRXz5+fQfCyZCSL8iTD9Sgc+ Wq/A14vWxTk=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=aqtX2tLtRIHz1U1nWqtiZXDvbXE=; b=H6w u4VY7Yp/PfOJ0X87kyjPIJJqgdb3fznsQ3Dkx4OdHMGzMQrsv8l5j6/lM0FkyqLe ZU1q34ZkYXrrtADF8VGcyA7vqBUT+1uKOHagrGwgOBfnM6Fx6vRo0wKBWojUh9ca KJAGttetyfM9CXsUl8kiSiILCRie6eTkJit7zM6U=
X-Sasl-Enc hmttnwpxzZ8xsb7wM+pE/frMywlYT31AHGisMFmSD7Mw 1404157700
From python@bdurham.com
To python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-988f1f18
In-Reply-To <53B199C0.9040600@stoneleaf.us>
References <1404135829.10485.136092537.2F0486D2@webmail.messagingengine.com> <CAPTjJmpkz4DPyCYSPNoteUuuBOzySzhjHzYPEXUv4MFH1sYE1A@mail.gmail.com> <1404139465.27658.136120269.0CA38211@webmail.messagingengine.com> <53B18398.4090302@stoneleaf.us> <1404146834.28955.136173757.51576D44@webmail.messagingengine.com> <53B199C0.9040600@stoneleaf.us>
Subject Re: Creating a dict-like class that counts successful and failed key matches
Date Mon, 30 Jun 2014 15:48:20 -0400
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.11350.1404157703.18130.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404157703 news.xs4all.nl 2837 [2001:888:2000:d::a6]:34913
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73760

Show key headers only | View raw


Ethan,

>> Is this specific to the native Dict class (because its implemented in C vs. Python?) or is this behavior more general.

> I /think/ it's only dict, but I haven't played with subclassing lists, tuples, etc.  It's not a C vs Python issue, but a 
'implemented with __private methods' issue.  From what I have seen so
far in the confusion and frustration that decision 
has caused, I do not think it was a good one.  :(

Thanks for the heads-up!

Malcolm

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Creating a dict-like class that counts successful and failed key matches python@bdurham.com - 2014-06-30 15:48 -0400

csiph-web