MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / global_config

Method global_config

21-async/mojifinder/bottle.py:3259–3265  ·  view source on GitHub ↗

This reads or sets the global settings stored in class.settings.

(cls, key, *args)

Source from the content-addressed store, hash-verified

3257
3258 @classmethod
3259 def global_config(cls, key, *args):
3260 ''' This reads or sets the global settings stored in class.settings. '''
3261 if args:
3262 cls.settings = cls.settings.copy() # Make settings local to class
3263 cls.settings[key] = args[0]
3264 else:
3265 return cls.settings[key]
3266
3267 def prepare(self, **options):
3268 """ Run preparations (parsing, caching, ...).

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected