Skip to content

Commit 43ec49e

Browse files
committed
[doc] How to access the EvalEnviroment namespace
1 parent 870d680 commit 43ec49e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

patsy/eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ def capture(cls, eval_env=0, reference=0):
186186
187187
x = 1
188188
this_env = EvalEnvironment.capture()
189-
assert this_env["x"] == 1
189+
assert this_env.namespace["x"] == 1
190190
def child_func():
191191
return EvalEnvironment.capture(1)
192192
this_env_from_child = child_func()
193-
assert this_env_from_child["x"] == 1
193+
assert this_env_from_child.namespace["x"] == 1
194194
195195
Example::
196196

0 commit comments

Comments
 (0)