Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/143.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python中的魔术方法(dunders)与C+中的运算符重载相同吗+;? 例如,在Python中使用< C++ >代码>magic方法在Python中还有其他功能吗?_Python_C++_Operator Overloading_Magic Methods - Fatal编程技术网

Python中的魔术方法(dunders)与C+中的运算符重载相同吗+;? 例如,在Python中使用< C++ >代码>magic方法在Python中还有其他功能吗?

Python中的魔术方法(dunders)与C+中的运算符重载相同吗+;? 例如,在Python中使用< C++ >代码>magic方法在Python中还有其他功能吗?,python,c++,operator-overloading,magic-methods,Python,C++,Operator Overloading,Magic Methods,是和否。在实现/重写\uuuuueq\uuuuuu时,\uuuuu div\uuuuuu等与其他语言中的运算符重载相同,一些\uuuuu方法不一定与其他语言类似。有许多dunder方法与运算符重载无关:\uuuu str\uuuuuu,\uu len\uuuuu,\uuu iter\uuuuuuu。

是和否。在实现/重写
\uuuuueq\uuuuuu
时,
\uuuuu div\uuuuuu
等与其他语言中的运算符重载相同,一些
\uuuuu
方法不一定与其他语言类似。

有许多dunder方法与运算符重载无关:
\uuuu str\uuuuuu
\uu len\uuuuu
\uuu iter\uuuuuuu