You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to refactor the above code using with/__enter__/__exit__ form, however I failed because the execution flow is __call__(only once) -> __enter__ -> wrapped -> __exit__. And in the __enter__ I couldn't got args/kwargs, so the text could not substitute.
fix issue manrajgrover#157 -+- change decorator implementation -+- add an example of new decorator approach -+- it needs to write new tests but example work well
Description
I like the decorate pattern, but I found the text is always constant. I hope the text could change using some format strings.
I also write a simple version, it seems work as expected. Maybe the exist
Halo.__call__
could be refactor.The text was updated successfully, but these errors were encountered: