-
Notifications
You must be signed in to change notification settings - Fork 55
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
[DICT] Add support for pop() method #1891
base: devel-issue1894
Are you sure you want to change the base?
Conversation
Here is your checklist. Please tick items off when you have completed them or determined that they are not necessary for this pull request:
|
Hello again! Thank you for this new pull request 🤩. Please begin by requesting your checklist using the command |
65f4364
to
15fbca5
Compare
Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with |
Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed 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.
There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.
If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept
and referencing the issue.
Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept
on the relevant conversation explaining why the code can't be tested.
@@ -843,6 +847,22 @@ def _print_ListMethod(self, expr): | |||
|
|||
return f"{list_obj}.{method_name}({method_args})\n" | |||
|
|||
def _print_DictMethod(self, expr): | |||
method_name = expr.name |
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.
This code isn't tested. Please can you take a look
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.
/bot accept
Added for completeness. Will be tested in my next PR
Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with |
/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.
There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.
If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept
and referencing the issue.
Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept
on the relevant conversation explaining why the code can't be tested.
This PR is now too large. I am going to split it into 3 |
1d43a58
to
ef211ba
Compare
/bot run pr_tests |
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.
/bot run pr_tests |
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.
Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think! |
Hey @pyccel/pyccel-dev ! @EmilyBourne has just created this great new pull request! Check it out and let me know what you think! |
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.
Hey @yguclu, @EmilyBourne, this PR is looking pretty good. @EmilyBourne and @mustapha-belbiad think it is ready to merge. Could you add your expertise to confirm that this follows all the coding conventions and fits in Pyccel's future plans? Thanks 😄 |
Add support for the
dict
methodpop()
and the initialisation of a dictionary via a call to{}
. Syntactic, semantic and Python printing support is added. TheDictType
datatype is expanded to match the expected description from the docs. The classPythonDict
is added to manage the initialisation. The abstract classDictMethod
and the subclassDictPop
are defined to handle thepop()
method. Fixes #1886.Blocked by #1897