MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / replace

Method replace

tensorboard/context.py:84–101  ·  view source on GitHub ↗

Create a copy of this context with updated key-value pairs. Analogous to `namedtuple._replace`. For example, to create a new request context like `ctx` but with auth context `auth`, call `ctx.replace(auth=auth)`. Args: As to `__init__`. Returns:

(self, **kwargs)

Source from the content-addressed store, hash-verified

82 return self._client_feature_flags
83
84 def replace(self, **kwargs):
85 """Create a copy of this context with updated key-value pairs.
86
87 Analogous to `namedtuple._replace`. For example, to create a new
88 request context like `ctx` but with auth context `auth`, call
89 `ctx.replace(auth=auth)`.
90
91 Args:
92 As to `__init__`.
93
94 Returns:
95 A new context like this one but with the specified updates.
96 """
97 kwargs.setdefault("auth", self.auth)
98 kwargs.setdefault("remote_ip", self.remote_ip)
99 kwargs.setdefault("x_forwarded_for", self.x_forwarded_for)
100 kwargs.setdefault("client_feature_flags", self.client_feature_flags)
101 return type(self)(**kwargs)
102
103
104def from_environ(environ):

Calls

no outgoing calls