MCPcopy Create free account
hub / github.com/ActiveState/code / create_style

Function create_style

recipes/Python/577978_Text_Model/recipe-577978.py:6–14  ·  view source on GitHub ↗
(**kwds)

Source from the content-addressed store, hash-verified

4style_pool = {}
5defaultstyle = {}
6def create_style(**kwds):
7 style = defaultstyle.copy()
8 style.update(kwds)
9 key = hash_style(style)
10 try:
11 return style_pool[key]
12 except KeyError:
13 style_pool[key] = style
14 return style
15
16defaultstyle = create_style(textcolor='black', fontsize=10)
17

Callers 2

recipe-577978.pyFile · 0.85
updated_styleFunction · 0.85

Calls 3

hash_styleFunction · 0.85
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected