QuestionQ24Verified/Coding Conventions, Best Practices, and StandardizationCopy linkReport a problemAsk AstroTutorSave questionChoose the true statements concerning PEP 8 naming conventions.Choose twoAFunction and variable names should be lower-case with words separated by underscores.BYou should always use self as the first argument to instance methods, and cls as the first argument to class methods.CModules should have short names written in CamelCase.DConstants should be written in all lower-case letters with words separated by underscores.Show AnswerAnswerExplanationPEP 8 recommends lowercase function and variable names with underscores between words. It also specifies self as the first parameter of instance methods and cls as the first parameter of class methods. Module names are lowercase, and constants conventionally use uppercase letters with underscores.Show comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion