No Hungarian notation (ARCH2011)
Ce contenu n’est pas encore disponible dans votre langue.
Key python.naming.no-hungarian-notation · Severity info · Category naming
Hungarian-notation type prefixes like strName, iCount, b_flag and cryptic abbreviations add noise by repeating what the type system already conveys. Names should describe purpose, not type.
Incorrect
Section titled “Incorrect”def process(strName, iCount, b_active): lstItems = [] return lstItemsCorrect
Section titled “Correct”def process(name, count, is_active): items = [] return itemsDrop type prefixes and cryptic abbreviations; name identifiers by their purpose (e.g. strName → name).