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
Recently, while working on a function to get the Evaluation object for the current Bulitin function that is currently being evaluated, this issue of using an uppercase letter in a function name came up again.
Python's linters typically don't like it if you use an uppercase letter in a Python function or method name. Recently, I think linters, or the ones I use, have backed off a little in complaining about this.
In naming this new function, get_eval_Expression(), I've opted for using the uppercase letter, because that is just clearer here. This function finds an object of an Expression type.
Unless the community voices a serious objection to this, I propose we drop the lowercasing of names in functions and methods when it obscures the meaning, typically because the function refers to something that has an uppercase name.
In particular, we've been lowercasing Builtin names in our pytests. For example to test the HyperGeometric2F1 builtin function, we might have a test case called test_hypergeometric2f1, where I think test_HyperGeometric2F1 would be clearer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, while working on a function to get the
Evaluation
object for the current Bulitin function that is currently being evaluated, this issue of using an uppercase letter in a function name came up again.Python's linters typically don't like it if you use an uppercase letter in a Python function or method name. Recently, I think linters, or the ones I use, have backed off a little in complaining about this.
In naming this new function,
get_eval_Expression()
, I've opted for using the uppercase letter, because that is just clearer here. This function finds an object of anExpression
type.Unless the community voices a serious objection to this, I propose we drop the lowercasing of names in functions and methods when it obscures the meaning, typically because the function refers to something that has an uppercase name.
In particular, we've been lowercasing Builtin names in our pytests. For example to test the
HyperGeometric2F1
builtin function, we might have a test case calledtest_hypergeometric2f1
, where I thinktest_HyperGeometric2F1
would be clearer.Your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions