From bf5f870304da6d6707950717b1a8b087be215b69 Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Sat, 28 Oct 2017 12:10:39 +0200 Subject: [PATCH] Add a note about the graph variable It needs to be global and publicly available. Some people reading the tutorial may want to put it in its own function or the __main__ conditional, which won't work. --- docs/tutorial/tut01.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/tutorial/tut01.rst b/docs/tutorial/tut01.rst index d6aa604..3d6f9eb 100644 --- a/docs/tutorial/tut01.rst +++ b/docs/tutorial/tut01.rst @@ -105,6 +105,9 @@ To do this, it needs to know what data-flow you want to achieve, and you'll use The `if __name__ == '__main__':` section is not required, unless you want to run it directly using the python interpreter. + The name of the `graph` variable is arbitrary, but this variable must be global and available unconditionally. + Do not put it in its own function or in the `if __name__ == '__main__':` section. + Execute the job :::::::::::::::