MCPcopy
hub / github.com/marshmallow-code/marshmallow / get

Method get

src/marshmallow/experimental/context.py:65–73  ·  view source on GitHub ↗

Get the current context. :param default: Default value to return if no context is set. If not provided and no context is set, a :exc:`LookupError` is raised.

(cls, default: _DefaultT | EllipsisType = ...)

Source from the content-addressed store, hash-verified

63
64 @classmethod
65 def get(cls, default: _DefaultT | EllipsisType = ...) -> _ContextT | _DefaultT:
66 """Get the current context.
67
68 :param default: Default value to return if no context is set.
69 If not provided and no context is set, a :exc:`LookupError` is raised.
70 """
71 if default is not ...:
72 return _CURRENT_CONTEXT.get(default)
73 return _CURRENT_CONTEXT.get()

Callers 15

__new__Method · 0.80
_deserializeMethod · 0.80
_invoke_processorsMethod · 0.80
_serializeMethod · 0.80
_deserializeMethod · 0.80
__init__Method · 0.80
merge_errorsFunction · 0.80
get_lowernameFunction · 0.80
get_is_oldMethod · 0.80

Calls

no outgoing calls