Skip to content

Commit 831fe04

Browse files
committed
updates
1 parent 84765de commit 831fe04

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

examples/python-snippets/README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
These are basic examples that are posted to the discussion forum
2+
throughout the semester.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
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

Comments
 (0)