Method: flask.ctx._AppCtxGlobals.get
Calls: 5, Exceptions: 0, Paths: 1Back
Path 1: 5 calls (1.0)
'x' (3) 'foo' (2)
None (3) 'bar' (1) 11 (1)
None (2) 'bar' (1) 11 (1) 42 (1)
1def get(self, name: str, default: t.Any | None = None) -> t.Any:
2 """Get an attribute by name, or a default value. Like
3 :meth:`dict.get`.
4
5 :param name: Name of attribute to get.
6 :param default: Value to return if the attribute is not present.
7
8 .. versionadded:: 0.10
9 """
10 return self.__dict__.get(name, default)