Skip to content
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

Support "not in" #6211

Closed
bartv opened this issue Jul 3, 2023 · 2 comments
Closed

Support "not in" #6211

bartv opened this issue Jul 3, 2023 · 2 comments
Assignees
Labels
compiler enhancement New feature or request tiny Tiny issues usability This ticket is related to improved usability

Comments

@bartv
Copy link
Contributor

bartv commented Jul 3, 2023

The following code is not supported:

if value not in items:

end

This has to be written as:

if not (value in items):

end
@bartv bartv added the compiler label Jul 3, 2023
@sanderr sanderr added enhancement New feature or request usability This ticket is related to improved usability labels Jul 4, 2023
@sanderr
Copy link
Contributor

sanderr commented Jul 4, 2023

If implemented as syntactic sugar this would probably be very easy.

@sanderr sanderr added the tiny Tiny issues label Jul 4, 2023
@bartv
Copy link
Contributor Author

bartv commented Jul 4, 2023

If implemented as syntactic sugar this would probably be very easy.

The main idea is that when the syntax is very much like python it does that consistently

@FloLey FloLey self-assigned this Jul 10, 2023
@FloLey FloLey mentioned this issue Jul 10, 2023
9 tasks
inmantaci pushed a commit that referenced this issue Jul 12, 2023
# Description

The following code is not supported:

```
if value not in items:

end
```
This has to be written as:

```
if not (value in items):

end
```
with this PR both options are supported and do the same thing.

closes #6211

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [x] Attached issue to pull request
- [x] Changelog entry
- [ ] Type annotations are present
- [ ] Code is clear and sufficiently documented
- [ ] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
inmantaci pushed a commit that referenced this issue Jul 12, 2023
Pull request opened by the merge tool on behalf of #6244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler enhancement New feature or request tiny Tiny issues usability This ticket is related to improved usability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants