You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support sets as arguments to functions (pyccel#2031)
Improve the C-Python wrapper to allow passing sets as arguments. Fixespyccel#1663
**Commit Summary**
- Add documentation for set annotation
- Add description for C-Python API set manipulation functions
- Add support for constant set arguments to C functions
- Remove include guards from `Set_extensions.h` to allow extensions to
multiple set types
- Add a test for a function with a constant set argument
Copy file name to clipboardExpand all lines: docs/type_annotations.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,15 @@ a : set[int] = {1, 2}
82
82
b : set[bool] = {False, True}
83
83
c : set[float] = {}
84
84
```
85
-
So far sets can be declared as local variables or as results of functions.
85
+
Sets can be declared as local variables, arguments or results of functions translated to C. An argument can be marked as constant using a string annotation or (in a module) using the `Final` qualifier:
0 commit comments