-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a hack to support complicated
in
and enable a test:
each object, which supports `is` should have both `__contains__`, which is a regular python method and `contains-hack`, which does the same but is just a EO method. This is needed because currently it is only possible to use an identifier to address a python method. That is, calling "sring literal".__contains__(...) does not work now because of a limitation of a pass, which adds `self` to each method call. On the other hand, calling EO method is possible in any context, like `(pystring "sring literal").contains-hack ...` is ok.
- Loading branch information
Showing
4 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rces/org/polystat/py2eo/transpiler/simple-tests/expressions/comparisons/comparison-5.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
enabled: False | ||
enabled: True | ||
python: | | ||
def test(): | ||
return 9 in [x * x for x in range(1, 6) if (x % 2) == 1] |
df21123
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 wasn't able to retrieve PDD puzzles from the code base and submit them to GITHUB. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: