All Questions
7 questions
2
votes
2
answers
735
views
Memoizing decorator with retries - now with backoff added! (Part 3)
A continuation of Memoizing decorator with retries, part 2, and related to https://codereview.stackexchange.com/a/133493/47529. I liked my decorator before, but especially in my original use case of a ...
6
votes
3
answers
583
views
Memoizing decorator with retries, part 2
A while ago I asked this question Memoizing decorator that can retry and then promptly forgot about it. I more recently saw Python decorator for retrying w/exponential backoff and wanted to add ...
5
votes
2
answers
11k
views
Python decorator for retrying w/exponential backoff
This is my first decorator in Python! I found some of it on the internet but have tweaked it to our needs.
Here is the couple concerns of mine:
Multiple python version compatibility
Is grabbing the ...
12
votes
2
answers
2k
views
Memoizing decorator that can retry
I have some tasks that I'd like to memoize because they connect to a rather slow network and have to wait for the data. Unfortunately this network can be a little finnicky and we get occasional ...
4
votes
4
answers
3k
views
Python Decorator - inspecting function argument values
Some of my functions use a "fail_silently" flag. It is used in the following way:
...
11
votes
1
answer
4k
views
Try-except decorator for classmethods
This question is related to the Cactus Text Game Engine.
For easy error handling in Cactus, we've put together this small decorator. Essentially, the decorator wraps any class method in a ...
3
votes
2
answers
6k
views
Failing fast by raising an exception with a custom message
This is a script that utilizes lazy exception throwing. What I do is decorate a function that might throw an exception to throw an exception with a formatted string.
...