-
-
Notifications
You must be signed in to change notification settings - Fork 325
Adding support for set and frozenset objects #437
Answered
by
pyscripter
oleg-oleinik
asked this question in
Q&A
-
Hello,
Do you plan to connect python objects of type set and frozenset to p4d?
How can a Delphi program now iterate over such objects or check for the presence of specific values?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
pyscripter
Oct 18, 2023
You can manipulate them using the sequence api.
For instance using VarPyth:
PySet := VarPythonEval('set("abc")'); for var member in VarPyIterate(PySet) do WriteLn(member); if PySet.Contains("a") then Writeln('PySet contains "a");
Replies: 2 comments 1 reply
-
You can manipulate them using the sequence api.
For instance using VarPyth:
PySet := VarPythonEval('set("abc")'); for var member in VarPyIterate(PySet) do WriteLn(member); if PySet.Contains("a") then Writeln('PySet contains "a");
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
Thanks for the detailed answer.
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
oleg-oleinik
-
I have turned this into an issue #438 so that the python set C-API will be added.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment