您是否使用get/set模式(在Python中)? [英] Do you use the get/set pattern (in Python)?
本文介绍了您是否使用get/set模式(在Python中)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用get/set似乎是Java中的一种常见做法(由于各种原因),但我几乎看不到使用此功能的Python代码.
Using get/set seems to be a common practice in Java (for various reasons), but I hardly see Python code that uses this.
为什么要在Python中使用或避免使用get/set方法?
Why do you use or avoid get/set methods in Python?
推荐答案
查看全文