Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'example)': 0.07; 'python': 0.08; ';-)': 0.12; 'broken': 0.12; 'algorithm': 0.13; 'developers,': 0.15; 'question.': 0.15; 'caches': 0.16; 'sensibility': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.22; 'string': 0.24; 'code': 0.25; 'function': 0.27; 'bit': 0.28; 'but...': 0.30; 'context,': 0.30; 'understands': 0.30; '---': 0.31; 'anyone': 0.31; 'actually': 0.32; 'does': 0.32; 'header :User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'there': 0.33; 'nobody': 0.34; 'question': 0.35; 'uses': 0.36; 'received:org': 0.37; 'stable': 0.38; 'steven': 0.38; 'some': 0.38; "i'd": 0.39; 'url:org': 0.39; 'being': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'packages': 0.40; 'url:]': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=modelnine.org; s=modelnine1012; t=1326581175; bh=/u4n98ecIn+o0OzDN/vafM11yU9n4xMqTeAe9QrV1bU=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=ILwS9Ex27seiXjhYHB0bZR1+H70448JV62FEJR2Dg6txG6XhYmj/QsB6k8C2/mv3u C0+R12sT9kWJ1ejaaDPWgJUUIHi7Dh9LRUqM6X21BCp1zUlETEv83WxoR+zSeGnvJ6 S7JUE//HGtbOhutZKVxS16iFQjOTerEegdcHouy0= Date: Sat, 14 Jan 2012 23:45:59 +0100 From: Heiko Wundram User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120111 Thunderbird/10.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Hash stability References: <4f1107b7$0$29988$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326581730 news.xs4all.nl 6847 [2001:888:2000:d::a6]:42412 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18983 Am 14.01.2012 10:46, schrieb Peter Otten: > Steven D'Aprano wrote: >> How many people rely on hash(some_string) being stable across Python >> versions? Does anyone have code that will be broken if the string hashing >> algorithm changes? > > Nobody who understands the question ;) Erm, not exactly true. There are actually some packages out there (take suds [https://fedorahosted.org/suds/], for example) that rely on the hashing algorithm to be stable to function "properly" (suds uses hash() of strings to create caches of objects/XML Schemas on the filesystem). This, in a different context, bit me at the end of last week, when required to use suds to access EWS. I'd personally start debating the sensibility of this decision on the part of the suds developers, but... That's not the question. ;-) -- --- Heiko.