Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.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中描述符和属性访问的区别_Python_Get_Set_Descriptor_Getattr - Fatal编程技术网

python中描述符和属性访问的区别

python中描述符和属性访问的区别,python,get,set,descriptor,getattr,Python,Get,Set,Descriptor,Getattr,在python中,dunder get、set、delete与dunder getattr、setattr、delattr之间的区别是什么。 我认为它们的工作原理是一样的。我说得对不对? 为什么这两个都存在于python中。它们有什么不同的功能?您可能想签出:

在python中,dunder get、set、delete与dunder getattr、setattr、delattr之间的区别是什么。 我认为它们的工作原理是一样的。我说得对不对? 为什么这两个都存在于python中。它们有什么不同的功能?

您可能想签出: