Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Does': 0.04; 'python': 0.08; 'garbage': 0.09; 'subject:file': 0.13; 'wrote:': 0.15; 'pm,': 0.16; '>>>': 0.16; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'language': 0.20; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'reference.': 0.23; 'expect': 0.25; 'function': 0.26; 'objects': 0.28; 'objects.': 0.30; 'subject:support': 0.30; 'subject:?': 0.31; 'message- id:@gmail.com': 0.32; 'to:addr:python-list': 0.34; 'header:User- Agent:1': 0.34; 'there': 0.34; 'assuming': 0.37; 'another': 0.38; 'received:192': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'two': 0.38; 'run': 0.39; 'received:192.168.1': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'acts': 0.77; '02:07': 0.84; 'subject:mode': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=3JT2riyasUqFOrY2UxGBzM0tSpF/68JfzDJDCk/9O4E=; b=O0KhKShnBqnv5Fk8e3e5n0Lq+E0VbLFkN3J6y8M+j9PJp9ZY/tcLOSGD9iXpbN8XoE /m1sxuQ/9oBrB7VAOF8ROQUyR+h6wPlNcI4lyiSIJIvz9kYQDK3hYpb3djbWGgoY2/6W FvysPkVeSZTqXGOT3zSG+upi996ZmOThwFUUo= Date: Wed, 06 Jul 2011 14:42:30 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: Does hashlib support a file mode? References: mailman.715.1309977744.1164.python-list@python.org <5a4867f1-929c-4cde-b47e-4b11de767f39@h38g2000pro.googlegroups.com> In-Reply-To: <5a4867f1-929c-4cde-b47e-4b11de767f39@h38g2000pro.googlegroups.com> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309981365 news.xs4all.nl 21867 [2001:888:2000:d::a6]:38262 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8978 On 2011.07.06 02:07 PM, Phlip wrote: > If I call m = md5() twice, I expect two objects. You get two objects because you make the function run again. Of course, the first one is garbage collected if it doesn't have another reference. >>> m1 = hashlib.md5() >>> m2 = hashlib.md5() >>> m1 is m2 False Are you assuming Python acts like another language or is there something confusing in the docs or something else?