开发者

doesPythonLikeCamels

Are Java style camelCase names good practice in Python. I know Capilized names should be reserved by convention for Class names. Methods should be small letters according to good style, or actually I am not so sure. Is there PEP about naming?

COMMENTS:

Sor开发者_开发问答ry for camels :) , I learned from answer PEP8, that my title is actually properly called mixedCase (Capitalized version is the CamelCase) After reading the PEP, I know that normal small case function naming with underscores should be used for methods also.


PEP 8 contains all the answers.


It's best to match whatever your organization uses or is comfortable with. Preaching "the One True Python style" doesn't exactly build harmony if everyone else already uses some other uniform manner. If it's some random hodgepodge of styles, then go ahead and advocate for some unification.


Yes there's a PEP on code style, PEP 8.

Check "Naming Conventions"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜