MCPcopy Create free account
hub / github.com/hynek/structlog / bind

Method bind

src/structlog/stdlib.py:613–623  ·  view source on GitHub ↗
(self, **new_values: Any)

Source from the content-addressed store, hash-verified

611 return self.sync_bl._context
612
613 def bind(self, **new_values: Any) -> Self:
614 return self.__class__(
615 # logger, processors and context are within sync_bl. These
616 # arguments are ignored if _sync_bl is passed. *vroom vroom* over
617 # purity.
618 logger=None, # type: ignore[arg-type]
619 processors=(),
620 context={},
621 _sync_bl=self.sync_bl.bind(**new_values),
622 _loop=self._loop,
623 )
624
625 def new(self, **new_values: Any) -> Self:
626 return self.__class__(

Callers 1

test_bind_unbindMethod · 0.95

Calls 1

bindMethod · 0.45

Tested by 1

test_bind_unbindMethod · 0.76