Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7135
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: except KeyError, everywhere |
| References | <mailman.2437.1307132130.9059.python-list@python.org> <pan.2011.06.04.00.02.48.625000@nowhere.com> <mailman.2517.1307418168.9059.python-list@python.org> |
| Date | 2011-06-07 14:08 +1000 |
| Message-ID | <877h8y1dy3.fsf@benfinney.id.au> (permalink) |
| Organization | Unlimited download news at news.astraweb.com |
"Gabriel Genellina" <gagsl-py2@yahoo.com.ar> writes: > En Fri, 03 Jun 2011 21:02:56 -0300, Nobody <nobody@nowhere.com> escribió: > > > On Fri, 03 Jun 2011 22:08:16 +0200, Wilbert Berendsen wrote: > > > >> I find myself all over the place associating objects with each > >> other using dicts as caches: > > > > The general concept is called "memoization". There isn't an > > implementation in the standard library > > Yes, there is, in Python 3.2: > http://docs.python.org/py3k/library/functools.html#functools.lru_cache Beauty. Thanks! -- \ “If we don't believe in freedom of expression for people we | `\ despise, we don't believe in it at all.” —Noam Chomsky, | _o__) 1992-11-25 | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
except KeyError, everywhere Wilbert Berendsen <wbsoft@xs4all.nl> - 2011-06-03 22:08 +0200
Re: except KeyError, everywhere Nobody <nobody@nowhere.com> - 2011-06-04 01:02 +0100
Re: except KeyError, everywhere --> memoization Wilbert Berendsen <wbsoft@xs4all.nl> - 2011-06-05 00:27 +0200
Re: except KeyError, everywhere "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> - 2011-06-07 00:45 -0300
Re: except KeyError, everywhere Ben Finney <ben+python@benfinney.id.au> - 2011-06-07 14:08 +1000
Re: except KeyError, everywhere Ben Finney <ben+python@benfinney.id.au> - 2011-06-04 10:03 +1000
Re: except KeyError, everywhere Ben Finney <ben+python@benfinney.id.au> - 2011-06-04 10:37 +1000
csiph-web