calling upper() on a string, not working?

Paul Rubin http
Tue May 16 20:16:05 EDT 2006


John Salerno <johnjsal at NOSPAMgmail.com> writes:
> Now, I know the actual upper() function works, but I can't understand
> if there's a problem with *when* it's being called, or what's being
> done with it to get the second result above.

You are translating "original" which still has lower case letters:

     return original.translate(trans_table)

You want:

     return original.upper().translate(trans_table)



More information about the Python-list mailing list