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


Groups > comp.lang.python > #7135

Re: except KeyError, everywhere

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.alt.net!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail
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>
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
Date Tue, 07 Jun 2011 14:08:04 +1000
Message-ID <877h8y1dy3.fsf@benfinney.id.au> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Cancel-Lock sha1:ulpjvjO0XFjvtCsMSbt5BUqLxvA=
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Lines 22
Organization Unlimited download news at news.astraweb.com
NNTP-Posting-Host 1e418493.news.astraweb.com
X-Trace DXC=1\h2nlM7YXNRm_f?\>0G3FL?0kYOcDh@JW\:Hm@YlDbJljQ>0A6mD9OUGD@iN[Hd?O:_h@NNVcSQM
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7135

Show key headers only | View raw


"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 | 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