Python布尔方法命名可读性 [英] Python Boolean method naming readability
本文介绍了Python布尔方法命名可读性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于Python中的布尔方法,以下哪种方式更易读?
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
推荐答案
我会选择第一个(从Java开发人员的角度来看).
I would choose the first one (from the point of view of a Java developer).
这篇关于Python布尔方法命名可读性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文