This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marek Otahal
Recipients Marek Otahal, r.david.murray
Date 2015-08-31.16:15:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441037719.89.0.844228169817.issue24969@psf.upfronthosting.co.za>
In-reply-to
Content
EDIT: 
> i.foo_long(1337)

ofc, this should be: 
i.foo_long('hi', cacheSize=1337)

or for (2): 

class MyLib():
  def __init__(arg1, arg2):
    self._cacheSize = someComputation(arg1, arg2) # returns a number
  @lru_cache
  def foo_long(self, arg1, **kwds):
    pass
#user
import MyLib 
i = MyLib(100, 21)
# not to make it so simple: 
i.changeInternalStateSomehow() # updates arg1, arg2, and also _cacheSize
i.foo_long(1337, cacheSizeName='_cacheSize') # ref to self._cacheSize
History
Date User Action Args
2015-08-31 16:15:19Marek Otahalsetrecipients: + Marek Otahal, r.david.murray
2015-08-31 16:15:19Marek Otahalsetmessageid: <1441037719.89.0.844228169817.issue24969@psf.upfronthosting.co.za>
2015-08-31 16:15:19Marek Otahallinkissue24969 messages
2015-08-31 16:15:19Marek Otahalcreate