diff options
Diffstat (limited to 'advanced_python')
-rw-r--r-- | advanced_python/14_oop_multiple_inheritance.tex | 2 | ||||
-rw-r--r-- | advanced_python/15_decorators.tex | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/advanced_python/14_oop_multiple_inheritance.tex b/advanced_python/14_oop_multiple_inheritance.tex index 2ac7202..6b244a0 100644 --- a/advanced_python/14_oop_multiple_inheritance.tex +++ b/advanced_python/14_oop_multiple_inheritance.tex @@ -131,7 +131,7 @@ Base \begin{lstlisting} class C1(B, A): def __init__(self): - print('C') + print('C1') super().__init__() In []: c1 = C1() diff --git a/advanced_python/15_decorators.tex b/advanced_python/15_decorators.tex index 77ae8a7..b5bd61d 100644 --- a/advanced_python/15_decorators.tex +++ b/advanced_python/15_decorators.tex @@ -251,7 +251,7 @@ Hi \begin{frame}[plain, fragile] \frametitle{Exercise: simplest decorator} \begin{block}{} - Write a decorator called \py{greet} that prints \py{'Hello'} before a + Write a decorator called \py{greet} that prints \py{'Hello'} before the function is called. \end{block} \begin{lstlisting} @@ -321,7 +321,7 @@ def greet(func): def my_func(x): print(x) - In []: f(1) + In []: my_func(1) my_func 1 \end{lstlisting} @@ -355,7 +355,7 @@ def debug(func): def my_func(x): print(x) - In []: f(1) + In []: my_func(1) DEBUG: my_func 1 \end{lstlisting} |