由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - python里面的__slot__是用来做什么?
相关主题
How to make sure that I get the original object or only a copy (not original) in such situation?问个overloading new operator的问题
another c++ interview question请问一个implicit conversion的问题(C++)
[c++] static function in a class一个inheritance 的问题
C++做题,麻烦师傅们再看看。这个问题怎么答?
请教goodbug等大神几个AWS的问题question overloading ++ error
请教高手一个C++问题one question about overloading operator delete
why use static function here?这段code有啥问题?
Java banned operator overloadingC++ func overload question
相关话题的讨论汇总
话题: __话题: instances话题: slot话题: dict话题: python
进入Programming版参与讨论
1 (共1页)
mw
发帖数: 525
1
我怎么google了半天也没什么结果
有没有比较熟悉的人给讲讲?
谢谢啦
r****t
发帖数: 10904
2
avoid creating __dict__ for instances from this class. Only enough memory is
used to store attributes appearing in __slots__.
For such instances, there's no __dict__, hence the space saving. Useful if
you are going to have large number of instances from some simple class.
d***q
发帖数: 1119
3
it sth likes the operator [] overloading in c++
1 (共1页)
进入Programming版参与讨论
相关主题
C++ func overload question请教goodbug等大神几个AWS的问题
How to overload global new operator?请教高手一个C++问题
python 可以给class动态添加method吗?why use static function here?
operator overloading (C++)Java banned operator overloading
How to make sure that I get the original object or only a copy (not original) in such situation?问个overloading new operator的问题
another c++ interview question请问一个implicit conversion的问题(C++)
[c++] static function in a class一个inheritance 的问题
C++做题,麻烦师傅们再看看。这个问题怎么答?
相关话题的讨论汇总
话题: __话题: instances话题: slot话题: dict话题: python