En Wed, 30 Apr 2008 05:00:26 -0300, Arnaud Delobelle
<[EMAIL PROTECTED]> escribió:
"Gabriel Genellina" <[EMAIL PROTECTED]> writes:
En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]> escribió:
"Lutz Horn" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
So just for completion, the solution is:
chr(ord('a') + 1)
'b'
thanks :) I'm a beginner and I was expecting this to be a member of
string so I couldnt find it anywhere in the docs.
And that's a very reasonable place to search; I think chr and ord are
builtin functions (and not str methods) just by an historical
accident. (Or is there any other reason? what's wrong with "a".ord()
or str.from_ordinal(65))?
Not a reason, but doesn't ord() word with unicode as well?
Yes, so ord() could be an instance method of both str and unicode, like
upper(), strip(), and all of them...
And str.from_ordinal(n)==chr(n), unicode.from_ordinal(n)==unichr(n)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list