New submission from Nick Coghlan <ncogh...@gmail.com>:

As per private email to Raymond, I would like to move the lru_cache access 
attributes and methods into a CacheInfo class, exposed as a "cache" attribute 
with several methods and read-only properties.

Read-only properties: hits, misses, maxsize
Methods: clear(), __len__()

As an implementation detail, cache_misses and cache_hits become nonlocal 
variables rather than attributes of the wrapper function.

Priority set to high, since the current API will be locked in as soon the first 
beta goes out.

----------
assignee: rhettinger
files: functools_lru_cache_introspection.diff
keywords: patch
messages: 122879
nosy: georg.brandl, ncoghlan, rhettinger
priority: high
severity: normal
status: open
title: Enhanced cache access API for functools.lru_cache
versions: Python 3.2
Added file: 
http://bugs.python.org/file19880/functools_lru_cache_introspection.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10586>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to