[Barry Warsaw] >I've pushed out a revised PEP 8 >http://www.python.org/peps/pep-0008.html >Please review and comment.
Hi, Barry, and people. Allow me a few remarks, nothing essential. * Within "Naming Conventions", "Prescriptive: Naming Conventions", "Module names", we read: Modules should have short, lowercase names, without underscores. I would like that PEP 0008 add some cement around this idea that common English words, properly spelled, which are likely to be user variable names, be avoided whenever reasonable. * Within "Code lay-out", "Blank Lines", we read: Separate top-level function and class definitions with two blank lines. In a running English text (like in this message!), it might make sense, but after tried for a long while both a single line and two lines between top-level elements in Python programs, I did not see that two lines gives so much more legibility to be worth a prescription. One white line is enough in my opinion, and I wonder if "with two blank lines" could not be replaced by "at least one blank line". * Within "Programming Recommendations", writers are suggested to prefer str methods of the string module, as well as a few others more recent additions (recent in the history of Python). I wonder if this would not be a good place to suggest more of such. These come to mind: - Replacing "apply(func, args)" with "func(*args)". - Replacing "for line in file.readlines():" with "for line in file:". - Replacing "for key in dict.keys():" with "for key in dict:". - Replacing "if has_key(dict, key):" with "if key in dict:". and there might be others. Deprecated functions could be listed, too. -- François Pinard http://pinard.progiciels-bpi.ca _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com