index
:
dabeaz_pycon2015_gil
master
Examples from David Beazley talk at PyCon 2015
Matěj Cepl <mcepl@cepl.eu>
summary
refs
log
tree
commit
diff
stats
log msg
author
committer
range
path:
root
/
fib.py
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'fib.py')
-rw-r--r--
fib.py
5
1 files changed, 5 insertions, 0 deletions
diff --git a/fib.py b/fib.py
new file mode 100644
index 0000000..129fb51
--- /dev/null
+++ b/
fib.py
@@ -0,0 +1,5 @@
+def fib(n):
+ if n <= 2:
+ return 1
+ else:
+ return fib(n-1) + fib(n-2)