We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isupper
The javascript definition of isupper is defined here:
function isupper(a) { return /^[A-Z_$]*$/.test(a); }
This is slightly different from the Python implementation, with respect to digits:
'__IGNORE_0'.isupper() # True
/^[A-Z_$]*$/.test('__IGNORE_0'); // false
The regex should be updated to /^[A-Z0-9_$]*$/
/^[A-Z0-9_$]*$/
The text was updated successfully, but these errors were encountered:
Okay, thanks for reporting it!
It still isn't right, because in Python '0'.isupper() == False. But you're right that it needs fixing.
'0'.isupper() == False
Sorry, something went wrong.
Ah, very true. Good catch!
https://docs.python.org/3/library/stdtypes.html#str.isupper
Return True if all cased characters [4] in the string are uppercase and there is at least one cased character, False otherwise.
It sounds like the main edge case is that there must be one cased character.
I opened a PR here that adds test cases that I think covers all the edge cases: #45
Successfully merging a pull request may close this issue.
The javascript definition of
isupper
is defined here:This is slightly different from the Python implementation, with respect to digits:
The regex should be updated to
/^[A-Z0-9_$]*$/
The text was updated successfully, but these errors were encountered: