-
Notifications
You must be signed in to change notification settings - Fork 172
add string.py with constants #2746
New issue
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| from string import ascii_lowercase, ascii_letters | ||
|
|
||
| def test_string(): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to call the function below ;)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ouch!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in #2788
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps one can write a custom flake8 plugin using https://pypi.org/project/flake8-plugin-utils/ that checks all functions that are defined, are being called.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it has to be custom. You could probably use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LPython itself should give a warning for something like this. |
||
| assert ascii_lowercase == 'abcdefghijklmnopqrstuvwxyz' | ||
| assert ascii_letters == 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
|
|
||
| print(ascii_lowercase) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| whitespace : str = ' \t\n\r\v\f' | ||
| ascii_lowercase : str = 'abcdefghijklmnopqrstuvwxyz' | ||
| ascii_uppercase : str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
| ascii_letters : str = ascii_lowercase + ascii_uppercase | ||
| digits : str = '0123456789' | ||
| hexdigits : str = digits + 'abcdef' + 'ABCDEF' | ||
| octdigits : str = '01234567' | ||
| punctuation : str = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" | ||
| printable : str = digits + ascii_letters + punctuation + whitespace |
Uh oh!
There was an error while loading. Please reload this page.