Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catboost/catboost
/ Counter
Class
Counter
library/python/func/ut/test_func.py:27–31 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
25
26
def
test_memoize():
27
class
Counter(object):
28
@staticmethod
29
def
inc():
30
Counter._qty = getattr(Counter,
'_qty'
, 0) + 1
31
return
Counter._qty
32
33
@func.memoize()
34
def
t1(a):
Callers
2
get_counter
Function · 0.70
io_job
Function · 0.70
Calls
no outgoing calls
Tested by
2
get_counter
Function · 0.56
io_job
Function · 0.56