Message249410
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 |
|
Date |
User |
Action |
Args |
2015-08-31 16:15:19 | Marek Otahal | set | recipients:
+ Marek Otahal, r.david.murray |
2015-08-31 16:15:19 | Marek Otahal | set | messageid: <1441037719.89.0.844228169817.issue24969@psf.upfronthosting.co.za> |
2015-08-31 16:15:19 | Marek Otahal | link | issue24969 messages |
2015-08-31 16:15:19 | Marek Otahal | create | |
|