use istitle , isalpha on string literal
fixes #2376
This looks good to me @Agent-Hellboy! Thank you so much for the contributions! Can you add some tests for the istitile() and isalpha() on compile time strings? (I think the tests refactored in this PR are for runtime strings.)
Can you add some tests for the
istitile()andisalpha()on compile time strings? (I think the tests refactored in this PR are for runtime strings.)
Hi @Shaikh-Ubaid, I didn't understand much, so the test added in test_str_attribute is for execution happening at asr, I guess that's compile time, for runtime where do I need to add those tests?
@Agent-Hellboy What is the status of this PR? Resolve the conflicts and reviews. After that mark it as Ready for review.
We can add both compile time and run time in the same test. Example:
"abc".istitle() # compile time
s: str = "abc"
s.istitle() # runtime
I think @Shaikh-Ubaid suggested to keep the test removed from test_str_01.py
@Agent-Hellboy What is the status of this PR? Resolve the conflicts and reviews. After that mark it as Ready for review.
We can add both compile time and run time in the same test. Example:
"abc".istitle() # compile time s: str = "abc" s.istitle() # runtimeI think @Shaikh-Ubaid suggested to keep the test removed from test_str_01.py
sure, let me do it.
Hi @Thirumalai-Shaktivel Actually I made a fresh clone and fetched the PR and have made some changes, now I am stuck in a git issue.
git pull myclone main
From https://github.com/Agent-Hellboy/lpython
* branch main -> FETCH_HEAD
* [new branch] main -> myclone/main
Current branch redo_ismethods is up to date.
as you can see redo_ismethods is in sync still i am getting the below error
git push myclone redo_ismethods
Username for 'https://github.com': Agent-Hellboy
Password for 'https://[email protected]':
To https://github.com/Agent-Hellboy/lpython.git
! [rejected] redo_ismethods -> redo_ismethods (non-fast-forward)
error: failed to push some refs to 'https://github.com/Agent-Hellboy/lpython.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.