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
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
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
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
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
"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
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 (