> I just did an experiment which involved running the Python > script appended below over the Library Reference index. > The results were: > > Total names: 1908 > lower_names: 1684 > Percent lower: 88.2599580713 > > An 88% majority seems like a fairly clear vote to me. :-) > > --------------------------------------------------------------------- > # Count function name styles from the Python Library Reference Index. > import re, sys > pat = re.compile(r"[A-Za-z_][A-Za-z0-9_]*\(\)") > all = {} > lc = {} > for line in sys.stdin: > for word in pat.findall(line): > all[word] = 1 > if word == word.lower(): > lc[word] = 1 > print "Total names:", len(all) > print "lower_names:", len(lc) > print "Percent lower:", 100.0 * len(lc) / len(all) > --------------------------------------------------------------------- Now try that again but only look for names following 'def'. You've counted all language keywords, builtins, modules, etc. We should be looking for method and function definitions only. OTOH, since Tim has Spoken, maybe we should just adopt alllowercase() as the preferred convention. :) --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4