Skip to main content


Showing posts from July, 2016

Python Naming Conventions

Python Naming ConventionsThis really helped me out a lot when pylint would output ambiguous error messages that wouldn't really help me to solve the "riddle". For instance incorrect function name, what the heck does that mean to someone who has never used python or at least not that often? Everything that I could find in Google, the forums and even pylint's web page, wouldn't really give me the answers to my syntax naming convention woes. Hope this helps someone else.Many thanks to the people over at CodingConvention on GitHub1. GeneralAvoid using names that are too general or too wordy. Strike a good balance between the two.Bad: data_structure, my_list, info_map, dictionary_for_the_purpose_of_storing_data_representing_word_definitionsGood: user_profile, menu_options, word_definitionsDon’t be a jackass and name things “O”, “l”, or “I”When using CamelCase names, capitalize all letters of an abbreviation (e.g. HTTPServer)2. PackagesPackage names should be all lower…