I m seeking some equivalent in C of python’s set() variable type
any ideas?
here is the python doc about sets http://docs.python.org/2/library/sets.html
and could you explain/link me a help for this? please
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there isn’t. The Python datatype relies on a lot of things regarding Python objects that the more low-level data you typically work with in C simply don’t have.
Like being able to compare two “objects” reliably, regardless of their type or internal structure.
The more you know about your data the easier it will be to roll your own, of course.
I would recommend you look at glib’s hash tables if you want to use a library.