> What about adding an intermediate namespace called "cache", so that the new 
> operations are available like this:
> 
>      print get_phone_number.cache.hits
>      get_phone_number.cache.clear()
> 
> ?
> 
> It's just a little more overhead, but I think it reads quite a bit better.

Or we could use pseudo-namespacing: get_phone_number.cache_hits,
get_phone_number.clear_cache()

Regards

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to