Replies: 2 comments 1 reply
-
You could make end=None a keyword argument of your function, and then proceed depending on the value of end and verbose. like
If verbose evaluates to False, the print statement will not be executed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
How about def _prnt(*args, **kwargs):
if verbose: print(*args, **kwargs) ( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looking for a minimal effort path to turn off a ton of diagnostic prints (with strings & comma separated variables in them) I opted to bulk edit every occurrence of print( to _prnt( where _prnt( is
thinking I could use the verbose flag to switch the prints on & off at will. This worked right up to the first print with a , end=' ' in it, where it fell over with
Can someone suggest a solution please? I've googled this to a dead end.
Beta Was this translation helpful? Give feedback.
All reactions