문제

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:

Sorry 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"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top