Rename argument "none" to a better name since it is very easy to missread it as None #181
Answered
by
arizvisa
Harding-Stardust
asked this question in
Q&A
-
Line 1791 in af07f16 |
Beta Was this translation helpful? Give feedback.
Answered by
arizvisa
Dec 6, 2023
Replies: 2 comments 1 reply
-
Actually, that parameter is actually intended to be read as |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am having some problems to wrap my head around this. This is to allow the user to send in None instead of an empty string? |
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
Yep. Anytime you give
None
as a function parameter, it will remove the thing as opposed to just setting it to empty. This is used in things like tags, colors, types, variable names, etc.With tags, you can assign an empty string to them. With colors, assigning the value 0 makes it black, whereas
None
removes the color. Variable names when set toNone
make it use the default variable name.