MCPcopy Create free account
hub / github.com/ActiveState/code / isset

Method isset

recipes/Python/577524_Python_Sessions/recipe-577524.py:54–59  ·  view source on GitHub ↗

Is the variable set in the session?

(self, name)

Source from the content-addressed store, hash-verified

52 self.path = os.path.join(S_DIR, sid+S_EXT)
53
54 def isset(self, name):
55 """Is the variable set in the session?"""
56 if not self.started:
57 raise NotStarted("Session must be started")
58
59 return name in self
60
61 def unset(self, name):
62 """Unset the name from the session"""

Callers 2

setdefaultMethod · 0.95
mainFunction · 0.45

Calls 1

NotStartedClass · 0.85

Tested by

no test coverage detected