python中setter创建时为何返回新property对象,而不是修改原property的self.fset ?

你好,创建setter以及deleter的时候为什么返回一个新的property 对象,而不是在原对象中将self.fset = fset,这样不是避免了新建对象的开销么? 我想知道文中的这种做法是否别有深意?Thanks.

文章地址 https://blog.csdn.net/m0_49079037/article/details/107204091 https://blog.csdn.net/m0_49079037/article/details/107204091

请问你直接修改fset或fdel参数不好吗?