Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9020
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!goblin3!goblin.stu.neva.ru!newsfeed3.funet.fi!newsfeeds.funet.fi!news.cc.tut.fi!not-for-mail |
|---|---|
| From | Anssi Saari <as@sci.fi> |
| Newsgroups | comp.lang.python |
| Subject | Re: Does hashlib support a file mode? |
| Date | Thu, 07 Jul 2011 14:29:38 +0300 |
| Lines | 9 |
| Message-ID | <vg3k4buib19.fsf@pepper.modeemi.fi> (permalink) |
| References | <5a4867f1-929c-4cde-b47e-4b11de767f39@h38g2000pro.googlegroups.com> <iv2dte$mp6$1@speranza.aioe.org> |
| NNTP-Posting-Host | pepper.modeemi.fi |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| X-Trace | news.cc.tut.fi 1310038178 31765 2001:708:310:3430:203:baff:fe7d:42dd (7 Jul 2011 11:29:38 GMT) |
| X-Complaints-To | abuse@tut.fi |
| NNTP-Posting-Date | Thu, 7 Jul 2011 11:29:38 +0000 (UTC) |
| User-Agent | Gnus/5.101 (Gnus v5.10.10) Emacs/21.3 (usg-unix-v) |
| Cancel-Lock | sha1:7bILVYsxtuU1us/McRwpj47P/zQ= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9020 |
Show key headers only | View raw
Mel <mwilson@the-wire.com> writes: > def file_to_hash(path, m = hashlib.md5()): > > hashlib.md5 *is* called once; that is when the def statement is executed. Very interesting, I certainly wasn't clear on this. So after that def, the created hashlib object is in the module's scope and can be accessed via file_to_hash.__defaults__[0].
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Does hashlib support a file mode? Phlip <phlip2005@gmail.com> - 2011-07-06 12:07 -0700
Re: Does hashlib support a file mode? geremy condra <debatem1@gmail.com> - 2011-07-06 15:15 -0400
Re: Does hashlib support a file mode? Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-06 14:42 -0500
Re: Does hashlib support a file mode? Mel <mwilson@the-wire.com> - 2011-07-06 15:43 -0400
Re: Does hashlib support a file mode? Anssi Saari <as@sci.fi> - 2011-07-07 14:29 +0300
Re: Does hashlib support a file mode? Paul Rudin <paul.nospam@rudin.co.uk> - 2011-07-07 13:13 +0100
Re: Does hashlib support a file mode? Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-06 13:48 -0600
Re: Does hashlib support a file mode? Ethan Furman <ethan@stoneleaf.us> - 2011-07-06 13:24 -0700
csiph-web