DEV Community

Discussion on: A use case for decorator in Python: retry a function

Collapse
 
iblancasa profile image
Israel Blancas

Good post!

I’m not sure but... Isn’t the “return wrapper” overindented? Otherwise, Python will try to return “wrapper” inside “wrapper” instead from “retry”.

Collapse
 
rattlingshinuiba profile image
Rattlingshinuiba

you mean the final return statement in these diff views?You are totally right! Thank you for pointing it out.

Collapse
 
rattlingshinuiba profile image
Rattlingshinuiba

But I’m not going to edit out my stupid errors otherwise someone else would be confused by our conversation. Anyway, Thanks!