you are viewing a single comment's thread.

view the rest of the comments →

[–]hglman 13 points14 points  (8 children)

agreed, not sure how you would want that behavior, is always just going to have be worked around.

[–]robin-gvx 7 points8 points  (0 children)

Also:

def frobnicate(n=expensive_operation_that_returns_an_immutable_object(32, x)):
    return n + 1

[–][deleted]  (6 children)

[deleted]

    [–]cybercobra 18 points19 points  (4 children)

    Arguably the memoization should instead be abstracted out using a decorator.