Newbie question - better way to do this?

Steve Howell showell30 at yahoo.com
Mon May 28 09:45:05 EDT 2007


--- Nis Jørgensen <nis at superlativ.dk> wrote:

> Steve Howell skrev:
> 
> > def firstIsCapitalized(word):
> >     return 'A' <= word[0] <= 'Z'
> 
> For someone who is worried about the impact of
> non-ascii identifiers,
> you are making surprising assumptions about the
> contents of data.
> 

The function there, which I don't even remotely
defend, had nothing to with the main point of the
thread.  Others pointed out that correct idiom here is
word.istitle(), but the main point of the thread was
how to prevent the newbie from essentially reinventing
itertools.groupby.

If you want to point out holes in my logic about the
impact of non-ascii identifiers (the above code,
though bad, does not suggest a hole in my logic; it
perhaps even adds to my case), can you kindly do it in
a thread where that's the main point of the
discussion?




       
____________________________________________________________________________________Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222



More information about the Python-list mailing list