We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
>>> from hugr import Node >>> n = Node(0, _num_out_ports=1) >>> list(n[:0])
Expected output is [], but it actually gives [OutPort(Node(0), 0)].
[]
[OutPort(Node(0), 0)]
This is because stop index 0 is evaluated as falsy in
hugr/hugr-py/src/hugr/node_port.py
Line 173 in 95b3949
None
The text was updated successfully, but these errors were encountered:
fix(py): Invalid node indexing (#1457)
d6edcd7
Fixes #1454, and other failing cases
aborgna-q
Successfully merging a pull request may close this issue.
Expected output is
[]
, but it actually gives[OutPort(Node(0), 0)]
.This is because stop index 0 is evaluated as falsy in
hugr/hugr-py/src/hugr/node_port.py
Line 173 in 95b3949
We should replace this with an explicit check for
None
.The text was updated successfully, but these errors were encountered: