Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; "subject:' ": 0.07; 'immutable': 0.09; 'insertion': 0.09; 'received:internal': 0.09; 'cc:addr:python-list': 0.11; 'behave': 0.16; 'lie': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'mutable': 0.16; 'objects.': 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:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'things.': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'function': 0.29; 'on,': 0.29; 'sets': 0.30; "skip:' 10": 0.31; 'class': 0.32; 'could': 0.34; 'received:66': 0.35; 'done': 0.36; 'received:10': 0.37; 'nov': 0.38; '12,': 0.39; 'from:no real name:2**0': 0.61; "you've": 0.63; 'header:Message- Id:1': 0.63; 'provide': 0.64; 'to:addr:gmail.com': 0.65; '2013,': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:cc:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= lRsRw4jyiJX6a/sK45HwnXyYBSE=; b=LQcMMRErE70NWh9LHAkGA+n1yGkk2/MV DEKUVNNM5I+vli6vYeo21C9E5VuMqBM5v175Fz1YIQgD8tx81QxdNwW/BjiULCkh GqDyzLlHr9JUEtv9707Qp6d3zDtqrh4pF7Q7O2gGPZiy8+R/NGjmySYQiD4hM++M MoN127ULd94= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=lRsRw4jyiJX6a/sK45HwnXyYBSE=; b=TlU iqroqvAIMvaSylOXxyexzL1U7634wyXeqPQCwoOHdziLwebRdnnq/P+sqEIIm4vd dP9AWRjjHYvs4qtjENk2kWvg9d8HlcgscovZPuyJpqOUUAzDVvcSaCSsumMPBHAP fDpLNOX21PtSYEvWqHCfHyT22yt6uf6oAFt/Uzv0= X-Sasl-Enc: Yw71AXoUUQxCsCZRcHnQlrEK39UXOnKVc573dS+ovZN+ 1384271330 From: random832@fastmail.us To: =?UTF-8?Q?Frank-Rene=20Sch=C3=A4fer?= MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-d4893488 In-Reply-To: References: <1384206048.30461.46091021.634F0FCA@webmail.messagingengine.com> Subject: Re: 'isimmutable' and 'ImmutableNester' Date: Tue, 12 Nov 2013 10:48:50 -0500 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384271901 news.xs4all.nl 15931 [2001:888:2000:d::a6]:45939 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59213 On Tue, Nov 12, 2013, at 4:39, Frank-Rene Sch=C3=A4fer wrote: > > All you've done is proven that you can subvert things. By fiddling > > with __hash__, __eq__, and so on, you can make sets and dicts behave > > very oddly. Means nothing. >=20 > To the contrary, it means everything about what 'isimmutable' could > contribute: security against advert or inadvert insertion of mutable > objects. If an object can lie about its hashability, it can lie to your function too... unless you don't intend to provide a way for a _genuinely_ immutable class to say so.