[Zope] String .lower, .upper, and .title in a Python Script

complaw@hal-pc.org complaw@hal-pc.org
Thu, 13 Dec 2001 21:06:16 GMT


> > This is because title is a commonly-used (if not universal) property
> > of most objects, perhaps?
> > 
> 
> I would agree with you, IF you used title().  However, I used string.title()
> [i.e., an explicit call].  Same result.  Moreover, the same error occurs in
> regular python (e.g., not using Zope by only python).
> 

Incidentally, a work-about would be...


words = string.split(line)
for word in words:
  tmp_str = tmp_str + string.capitalize(word) + ' '
tmp_str = string.strip(tmp_str)


I'm wondering if title() is in a module other than string.

Cheers,

Ron