Skip to main content

Timeline for Memoizing decorator that can retry

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
S Jul 30, 2015 at 13:56 history bounty ended Dan Oberlam
S Jul 30, 2015 at 13:56 history notice removed Dan Oberlam
Jul 30, 2015 at 13:56 vote accept Dan Oberlam
Jul 30, 2015 at 1:22 history edited 200_success
edited tags
Jul 24, 2015 at 22:51 comment added Dan Oberlam @sunny look at the else case of the try-except blocks; I do exit the loop early. You're right - putting forget first will short circuit the boolean, but I tend to assume that I'm not very likely to set forget=True, and short circuiting the boolean isn't going to give me that much of a performance boost anyway, considering that dictionary lookup is O(1)* anyway
Jul 24, 2015 at 21:52 comment added sunny Sorry, I must be missing something obvious in your code, but I'm not sure what it is. (1) Why do you try n times regardless of the outcome of your function call? Wouldn't you want to exit the loop early if you had no exception? Also one critique: shouldn't you put forget as the first in your A or B tests to take advantage of lazy evaluation in cases where you set forget=True?
Jul 24, 2015 at 18:10 answer added Peilonrayz timeline score: 8
Jul 24, 2015 at 17:12 answer added jacwah timeline score: 5
Jul 24, 2015 at 14:21 history tweeted twitter.com/#!/StackCodeReview/status/624585222944890880
S Jul 24, 2015 at 13:20 history bounty started Dan Oberlam
S Jul 24, 2015 at 13:20 history notice added Dan Oberlam Draw attention
Jul 22, 2015 at 16:24 history edited Dan Oberlam CC BY-SA 3.0
added 12 characters in body
Jul 22, 2015 at 16:23 history edited Jamal CC BY-SA 3.0
deleted 43 characters in body
Jul 22, 2015 at 13:32 history edited Dan Oberlam CC BY-SA 3.0
edited title
Jul 22, 2015 at 12:38 history asked Dan Oberlam CC BY-SA 3.0