Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

Timeout error function craftin to treat functions that takes too long

$
0
0

guysIm trying to create a time out error, because some function take too long for certains attributes, and i want to skip these timely expensive ones:exemple to clarify:

.try:Timeout_fct( expensive_function(x))except:print('error')i want my my output to be 'error', caused ny the Timeout_fct, in case the expensive_function(x) took more than 5 secs


Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>