python的set()在C中是否有等价物? [英] is there an equivalent in C of python's set()?

查看:43
本文介绍了python的set()在C中是否有等价物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找 Python 的 set() 变量类型的 C 语言中的一些等价物有任何想法吗?这是关于集合的 python 文档 http://docs.python.org/2/library/集合.html

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

推荐答案

不,没有.Python 数据类型依赖于很多关于 Python 对象的东西,而您通常在 C 中使用的更底层的数据根本没有这些东西.

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.

我建议您查看 glib 的哈希表,如果你想使用图书馆.

I would recommend you look at glib's hash tables if you want to use a library.

这篇关于python的set()在C中是否有等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆