Become a member
Sign in
Lucas Cezimbra
Lucas Cezimbra

Lucas Cezimbra

https://Lrcezimbra.com.br/

29 Following
5 Followers
  • Profile

  • Claps

  • Highlights

  • Responses

Latest

Lucas Cezimbra
Lucas Cezimbra in CWI Software
Oct 28 · 2 min read

Como definir um timeout para uma função em Python

Resposta curta: timeout-decorator

pip install timeout-decoratorfrom timeout_decorator import timeout@timeout(5)  # tempo em segundos
def my_slow_function():
...

5