So I was wondering whether there is a Pythonic recommendation?ĮDIT: From the comments so far, both cases seem acceptable. I have done both in the past and my static code analysis tools don't seem to complain. Should I enclose the definition within the if statement or should I put the if inside the definition? # Case 1 ![]() ![]() I have a function I want to take different form depending on the mode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |