[Python-Dev] new LRU cache API in Py3.2 (original) (raw)
Georg Brandl g.brandl at gmx.net
Sat Sep 4 12:15:07 CEST 2010
- Previous message: [Python-Dev] new LRU cache API in Py3.2
- Next message: [Python-Dev] new LRU cache API in Py3.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 04.09.2010 12:06, schrieb Antoine Pitrou:
On Sat, 04 Sep 2010 11:42:08 +0200 Éric Araujo <merwok at netwok.org> wrote:
> What about adding an intermediate namespace called "cache", so that the new > operations are available like this: > > print getphonenumber.cache.hits > getphonenumber.cache.clear() > > ? > > It's just a little more overhead, but I think it reads quite a bit better.
Or we could use pseudo-namespacing: getphonenumber.cachehits, getphonenumber.clearcache() It looks better indeed.
+1.
Georg
-- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
- Previous message: [Python-Dev] new LRU cache API in Py3.2
- Next message: [Python-Dev] new LRU cache API in Py3.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]