-
Notifications
You must be signed in to change notification settings - Fork 56
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
List support/insert method #1727
Conversation
…to raise proper error message in case or dtype conflicts
/bot run docs pylint pyccel_lint spelling |
/bot run linux macosx windows |
/bot run coverage |
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.
Good job ! Your PR is using all the code it added/changed.
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.
Good job ! Your PR is using all the code it added/changed.
@EmilyBourne, @Farouk-Echaref has been working hard and thinks that they have now replied to or fixed all your comments. Could you take another look at the PR and see if you can approve now? |
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 good. Well done
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 good! I have some minor comments
tests/errors/semantic/blocking/INSERT_LIST_INCOMPATIBLE_TYPES_2.py
Outdated
Show resolved
Hide resolved
tests/errors/semantic/blocking/INSERT_LIST_INCOMPATIBLE_TYPES_0.py
Outdated
Show resolved
Hide resolved
@Farouk-Echaref, @yguclu has a few questions/comments about your code. Can you go through and see if you agree with them. If not go ahead and explain why. Once you've adressed all the comments let me know with |
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.
Good job ! Your PR is using all the code it added/changed.
Add support for the insert() method of Python lists to the semantic stage.
Add handling of that method to the Python printer. This fixes #1692.
Commit Summary
insert()
method, inheriting fromPyccelInternalFunction
. The constructor ensures compatibility between the datatypes of theinsert()
argument and the list for homogenous lists._class_type
attribute for methods that returnNone
_print_ListInsert()
to generate the appropriate Python representation of theinsert()
method.insert()
method involving many scenarios where the function could be used.