calling upper() on a string, not working?

Paul Rubin http
Wed May 17 02:16:05 CEST 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