-
Notifications
You must be signed in to change notification settings - Fork 171
Fixed compatibility of sep, end keyword with list/tuple containers #1512
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
Conversation
I'll pick some tests from the above shown function and add an integration file soon @Thirumalai-Shaktivel ! |
I think we have to add runtime tests. |
Great job, @anutosh491. Thanks for fixing this. |
Could you please elaborate more? If you are talking about adding a file in |
I was talking about saving the runtime output using |
I see. That's very much needed. For printing we can't use |
I think I am not fully sure how do I address these comments . I get that we could use the |
|
ping @czgdp1807 |
Nothing to worry about here. Just add normal |
LGTM! But, Let @czgdp1807 also review and approve this. |
Yess I'll be updating my integration test file with tests for printing arrays . Just want to get this output confirmed (#1512 (comment)) before I go on with that ! The changes makes printing arrays compatible with other data types/containers including arrays along with the end and sep keywords ! |
Does CPython and LPython print exactly the same thing, or does it differ? |
For something like
The CPython output is
But the lpython output is
Differences are
You coudl go through the thread (#1512 (comment)) where we have been discussing this . If you feel something more needs to be done for arrays , I can maybe open up a subsequent pr for it because I am quite confident about the initial changes which were mentioned in the issue description (#1512 (comment)) |
cc @certik |
I left some more comments. Otherwise I think this can be merged, and subsequent PRs can improve the rest. |
I've removed the ast based reference files which wouldn't be required anymore . I think now this maybe good to go ! |
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 fine for now. Squashing and merging.
Thanks @Thirumalai-Shaktivel @czgdp1807 and @certik for the great reviews on this one ! |
Fixes #1477
Some issues that were fixed are
sep
andend
keyword were assumed to be functioning correctly beforehand with data types likei32
,str
etc but trying out some cases showed that they aren't fully compatible . Pointed out in Variable of list[i32] type has unnecessary newline character while printing. #1477 (comment) . This has been addressed.Secondly all sorts of variations of print statements involving the
list
/tuple
containers have been fixed .These are like some random cases I thought and none of these work on master !