Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7131

Re: except KeyError, everywhere

From "Gabriel Genellina" <gagsl-py2@yahoo.com.ar>
Subject Re: except KeyError, everywhere
Date 2011-06-07 00:45 -0300
References <mailman.2437.1307132130.9059.python-list@python.org> <pan.2011.06.04.00.02.48.625000@nowhere.com>
Newsgroups comp.lang.python
Message-ID <mailman.2517.1307418168.9059.python-list@python.org> (permalink)

Show all headers | View raw


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


-- 
Gabriel Genellina

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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