Re: language analysis to enforce code standards

2009-07-10 Thread greg
Aahz wrote: Much simpler and *way* more efficient with a set: if len(set(s)) < N: print "Must have at least %s different characters" % N Or you could do a dictionary lookup on the words. I can just see the error message: "Your comment must include at least one verb, one noun, one non

Re: language analysis to enforce code standards

2009-07-10 Thread Tim Rowe
2009/7/10 Peter Otten <__pete...@web.de>: > Don't be a fool. Have someone other than the author read the comment. That's the winning answer as far as I'm concerned. Automated tools are good for picking up some types of accidental mistakes, but for checking that comments are meaningful (and variab

Re: language analysis to enforce code standards

2009-07-10 Thread Aahz
In article , Jean-Michel Pichavant wrote: > >You could also verify there are at least N different characters used in >the sentence: > >N = 5 # must contains at least 5 different characters >record = [] >for c in s: >if c not in record: >record += [c] >if len(record) >= N: >print

Re: language analysis to enforce code standards

2009-07-10 Thread Peter Otten
Jason S. Friedman wrote: > Hello, I administer the Informatica ETL tool at my company. Part of > that role involves creating and enforcing standards. I want the > Informatica developers to add comments to certain key objects and I want > to be able to verify (in an automated fashion) that they h

Re: language analysis to enforce code standards

2009-07-10 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Fri, 10 Jul 2009 02:06:35 +, Jason S. Friedman wrote: Hello, I administer the Informatica ETL tool at my company. Part of that role involves creating and enforcing standards. I want the Informatica developers to add comments to certain key objects and I want t

Re: language analysis to enforce code standards

2009-07-09 Thread Bruce C. Baker
"Jason S. Friedman" wrote in message news:mailman.2927.1247192026.8015.python-l...@python.org... > Hello, I administer the Informatica ETL tool at my company. Part of that > role involves creating and enforcing standards. I want the Informatica > developers to add comments to certain key obj

Re: language analysis to enforce code standards

2009-07-09 Thread Steven D'Aprano
On Fri, 10 Jul 2009 02:06:35 +, Jason S. Friedman wrote: > Hello, I administer the Informatica ETL tool at my company. Part of > that role involves creating and enforcing standards. I want the > Informatica developers to add comments to certain key objects and I want > to be able to verify (