loading...

re: Dead Simple Python: Lambdas, Decorators, and Other Magic VIEW POST

FULL DISCUSSION
 

There will be no "Transfiguring frog into frog-orange." since you redefined 'partial_transfiguration'.
Thanks for the useful article.

 

Where specifically is it redefined?

 
@party_cannon
def partial_transfiguration(target, combine_with):
    return f"{target}-{combine_with}"

😅

but before this, it was:

def partial_transfiguration(target, combine_with):
    result = f"{target}-{combine_with}"
    print(f"Transfiguring {target} into {result}.")
    return result

Ah, following you now. I've been working in C++ for the past couple of weeks, so "redefined" had a different connotation for me.

I had indeed removed the print statement in the second version! I'll go back and fix that. Thanks for the catch.

Code of Conduct Report abuse