Python Boolean method naming readability [closed]

☆樱花仙子☆ 提交于 2019-12-23 07:27:38

问题


Which of these ways is more readable for Boolean Method in Python?

document.is_editable    
document.editable    
document.has_editable    
document.can_be_editable    
document.can_edit

回答1:


I would choose the first one (from the point of view of a Java developer).



来源:https://stackoverflow.com/questions/16214385/python-boolean-method-naming-readability

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!