python-tutorial
python-tutorial copied to clipboard
Errors found in `functions_advanced` notebook
In the Decorators
, there is a typo in the print
inside the fcounter
function: has beel
instead of has been
.
Suggestion:
In Fibonnaci sequence using reduce, maybe it would be helpful to also have a reminder that reduce can have a 3rd entry which is the starting point for the sum
In the last example (once
), the following line is missing:
import typing as t
In the example code in the same example (once
), given as
import time
@once(15)
def hello(name):
return f"Hello, {name}!"
for i in range(30):
print(i)
try:
time.sleep(3)
print(hello(f"attempt #{i}"))
except TooSoonError as err:
print(f"Too soon: {err}")
the example error is defined as TooSoonError
, which is not defined else. As discussed on Slack, this is a leftover from testing, and could be marked as such.
Thanks!