NYC's Blog - Python中单双下划线的区别 的评论
http://niyanchun.com/underlines-in-python.html
注:本文大部分内容参考自Difference between _, and __xx in Python.在学习Python的时候,很多人都不理解为什么在方法(method)前面会加好几个下划...
-
友链博客
http://niyanchun.com/underlines-in-python.html/comment-page-1#comment-410
2018-01-01T12:32:55+08:00
元旦快乐(^▽^)
-
NYC
http://niyanchun.com/underlines-in-python.html/comment-page-1#comment-401
2017-12-19T11:38:44+08:00
是,可能这就是这种弱类型、非编译型语言的特点吧。只关注业务逻辑,语言本身上尽量简单化,约束少一些
-
大袋鼠
http://niyanchun.com/underlines-in-python.html/comment-page-1#comment-400
2017-12-19T11:34:32+08:00
学到了学到,总之就是 Python 没有在语言层面限制一个方法或属性是否私有,下划线什么的是约定俗成的东西。