We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84765de commit 831fe04Copy full SHA for 831fe04
examples/python-snippets/README
@@ -0,0 +1,2 @@
1
+These are basic examples that are posted to the discussion forum
2
+throughout the semester.
examples/python-snippets/numpy/functionfunction.py
@@ -0,0 +1,15 @@
+import sys
+
3
+def execute(x, function=None):
4
+ if function == None:
5
+ sys.exit("ERROR: no function supplied")
6
7
+ return function(x)
8
9
10
+def test_function(x):
11
+ a = "you passed in {}".format(x)
12
+ return a
13
14
15
+print execute("test", function=test_function)
0 commit comments