Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4551
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!z7g2000prh.googlegroups.com!not-for-mail |
|---|---|
| From | Raymond Hettinger <python@rcn.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Coolest Python recipe of all time |
| Date | Tue, 3 May 2011 09:43:41 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 22 |
| Message-ID | <b83ba48e-b019-493d-a0a6-4b01b23969f2@z7g2000prh.googlegroups.com> (permalink) |
| References | <69c1813d-1a9a-4686-9768-8ec1910a45f8@d19g2000prh.googlegroups.com> <ak5ur6pugqvjrs4dthlpp5j4q1i6h0gimv@4ax.com> <mailman.1079.1304369965.9059.python-list@python.org> <018ur6da31iv7us9gm4dpgl7tfl0i6snb2@4ax.com> <mailman.1092.1304399103.9059.python-list@python.org> |
| NNTP-Posting-Host | 76.94.45.111 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | posting.google.com 1304441022 22176 127.0.0.1 (3 May 2011 16:43:42 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Tue, 3 May 2011 16:43:42 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | z7g2000prh.googlegroups.com; posting-host=76.94.45.111; posting-account=4Y7qkQkAAACIJklcr0OP4w6S6TBL_zh2 |
| User-Agent | G2/1.0 |
| X-HTTP-UserAgent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:4551 |
Show key headers only | View raw
On May 2, 10:04 pm, Stefan Behnel <stefan...@behnel.de> wrote: > The bad thing about this recipe is that it requires quite a bit of > background knowledge in order to infer that the code the developer is > looking at is actually correct. At first sight, it looks like an evil hack, > and the lack of documentation doesn't help either. The recipe is cool in the same way that a magic trick is cool. A practical recipe would use a more general purpose method (perhaps using finite differences or continued fractions); it would have documentation and tests; it would accept a regular python function instead of a string; and it would avoid an unsanitized eval(). But then it would completely lose its panache, its flourish, and the pleasant gratification that you get when solving the riddle of how it works. We should have a separate thread for the most practical, best documented, least surprising, and most boring recipe ;-) Raymond
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-02 10:33 -0700
Re: Coolest Python recipe of all time David Monaghan <monaghand.david@gmail.com> - 2011-05-02 21:48 +0100
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-02 14:58 -0600
Re: Coolest Python recipe of all time David Monaghan <monaghand.david@gmail.com> - 2011-05-02 22:45 +0100
Re: Coolest Python recipe of all time Stefan Behnel <stefan_ml@behnel.de> - 2011-05-03 07:04 +0200
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-03 09:43 -0700
Re: Coolest Python recipe of all time Chris Angelico <rosuav@gmail.com> - 2011-05-04 07:54 +1000
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-03 16:10 -0600
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-02 23:17 -0600
Re: Coolest Python recipe of all time Terry Reedy <tjreedy@udel.edu> - 2011-05-03 02:00 -0400
Re: Coolest Python recipe of all time Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-03 18:29 +1200
Re: Coolest Python recipe of all time Terry Reedy <tjreedy@udel.edu> - 2011-05-03 11:49 -0400
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-03 09:32 -0700
Re: Coolest Python recipe of all time geremy condra <debatem1@gmail.com> - 2011-05-03 09:51 -0700
Re: Coolest Python recipe of all time Stefan Behnel <stefan_ml@behnel.de> - 2011-05-03 08:23 +0200
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-03 15:19 -0700
Re: Coolest Python recipe of all time Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-06 16:59 +0000
Re: Coolest Python recipe of all time geremy condra <debatem1@gmail.com> - 2011-05-06 10:43 -0700
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-06 12:36 -0600
Re: Coolest Python recipe of all time Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-07 08:29 +0000
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-07 08:54 -0600
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-07 14:02 -0700
Re: Coolest Python recipe of all time Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-06 13:38 -0600
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-06 12:58 -0700
RE: Coolest Python recipe of all time Trent Nelson <trent@snakebite.org> - 2011-05-09 02:31 -0700
Re: Coolest Python recipe of all time Raymond Hettinger <python@rcn.com> - 2011-05-09 14:10 -0700
csiph-web