How to prevent attributes access outside the class?

后端 未结 0 961
自闭症患者
自闭症患者 2021-01-18 12:21

I have defined 3 attributes (public, private, and protected) and am able to access all of them from outside. How do I prevent access?

class Speed:
    def __i         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题