-
Notifications
You must be signed in to change notification settings - Fork 163
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
Add isspace API in str #2373
Add isspace API in str #2373
Conversation
is the ci check disabled because of the conflicting files? |
Yup!
$ git checkout main
$ git pull lpython main # where `lpython` is the remote name of the lpython main repository
$ git checkout add_isspace_api
$ git merge main
# resolve conflicts if any
$ git reset main
# Now, all the changes you made will be ready to be staged
$ git add . # `.` represents the file you want to commit
$ git commit -m ".. message" # Commit all the files
$ git push -f origin add_isspace_api # where `origin` is the remote name for your lpython forked repository For more details on merging and rebasing, go through the page: https://github.com/lcompilers/lpython/blob/main/doc/src/rebasing.md |
5e75fa1
to
f40f524
Compare
Thanks, @Thirumalai-Shaktivel, what should I do for the below error?
Do reference tests get generated on the fly, do I need to delete all reference tests and then run |
Don't do it all the time, but for this PR you can do |
I'm sorry, I forgot to add the following command above: $ git clean -dfx
$ ./build.sh
$ ./run_tests.py # Use `-u` to update tests. |
@@ -0,0 +1,17 @@ | |||
warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded | |||
--> tests/../integration_tests/array_01_decl.py:2:1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the newly created *.stderr
files needs to be removed.
For that,
you can do
rm tests/reference/*
and then do./run_tests.py -u
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
@Agent-Hellboy The CI seems to fail currently. |
yes,
is one of the backend treating |
It is the You can construct a simple/minimum example using the |
The \v escape sequence is part of the standard C escape sequences |
I have used |
Co-authored-by: Shaikh Ubaid <shaikhubaid769@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is good, I left some comments.
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
src/runtime/lpython_builtin.py
Outdated
@@ -858,6 +858,15 @@ def _lpython_str_isascii(s: str) -> bool: | |||
return False | |||
return True | |||
|
|||
@overload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work:
@overload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what overload does. from the code, it seems it adds attributes to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @overload
allows you to use the same function name with different arguments like int and float. In this case there is only one function, so overload is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, we have to remove @overload
for many functions. I got confused with the actual meaning of overload, as it was used everywhere.
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
Co-authored-by: Ondřej Čertík <ondrej@certik.us>
@Agent-Hellboy why don't you fix the comment per my post above and then we can merge it. |
sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @Agent-Hellboy! Thank you so much for this!
fixes #2375