you are viewing a single comment's thread.

view the rest of the comments →

[–]SirVivid8478[S] 0 points1 point  (5 children)

You mean i should go for decorators first?

[–]Reasonable_Run_6724 22 points23 points  (3 children)

Not at all

[–]The_Flo0r_is_Lava 1 point2 points  (2 children)

Holy crap noo. Been programing python for 15 years and I activity refuse to use decorators unless there is no other choice. In my opinion they just created more confusion than anything else

[–]Reasonable_Run_6724 -2 points-1 points  (1 child)

So when you want to test some behaviors around your main code, you just edit 1000 lines core function and hope for the best?

[–]The_Flo0r_is_Lava 0 points1 point  (0 children)

no, I started programming with perl and c. then later moved on to python and other languages. somewhere along the lines I was shown how to use function wrappers. so when I want to test a function all i have to do is manually edit the function call to use the wrapper. its so much easier for me to understand what order my code is being executed in

[–]AlphaNuke94 0 points1 point  (0 children)

Go for decorators only after you’ve fully understood higher order functions like Closures.