mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 12:04:07 +01:00
String: update docstrings of ord/chr, we're using unicode now
This commit is contained in:
parent
9bfa1458ef
commit
c0527b6859
@ -53,7 +53,7 @@ class String(callbacks.Plugin):
|
|||||||
def ord(self, irc, msg, args, letter):
|
def ord(self, irc, msg, args, letter):
|
||||||
"""<letter>
|
"""<letter>
|
||||||
|
|
||||||
Returns the 8-bit value of <letter>.
|
Returns the unicode codepoint of <letter>.
|
||||||
"""
|
"""
|
||||||
irc.reply(str(ord(letter)))
|
irc.reply(str(ord(letter)))
|
||||||
ord = wrap(ord, ['letter'])
|
ord = wrap(ord, ['letter'])
|
||||||
@ -62,12 +62,12 @@ class String(callbacks.Plugin):
|
|||||||
def chr(self, irc, msg, args, i):
|
def chr(self, irc, msg, args, i):
|
||||||
"""<number>
|
"""<number>
|
||||||
|
|
||||||
Returns the character associated with the 8-bit value <number>
|
Returns the unicode character associated with codepoint <number>
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
irc.reply(chr(i), stripCtcp=False)
|
irc.reply(chr(i), stripCtcp=False)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error(_('That number doesn\'t map to an 8-bit character.'))
|
irc.error(_('That number doesn\'t map to a unicode character.'))
|
||||||
chr = wrap(chr, ['int'])
|
chr = wrap(chr, ['int'])
|
||||||
|
|
||||||
@internationalizeDocstring
|
@internationalizeDocstring
|
||||||
|
Loading…
Reference in New Issue
Block a user