##// END OF EJS Templates
typing: constrain argument/return types of encoding.toutf8b()
Yuya Nishihara -
r44077:83a349aa default
parent child Browse files
Show More
@@ -560,7 +560,7 b' else:'
560
560
561
561
562 def getutf8char(s, pos):
562 def getutf8char(s, pos):
563 # type: (Any, Any) -> Any
563 # type: (bytes, int) -> bytes
564 '''get the next full utf-8 character in the given string, starting at pos
564 '''get the next full utf-8 character in the given string, starting at pos
565
565
566 Raises a UnicodeError if the given location does not start a valid
566 Raises a UnicodeError if the given location does not start a valid
@@ -579,7 +579,7 b' def getutf8char(s, pos):'
579
579
580
580
581 def toutf8b(s):
581 def toutf8b(s):
582 # type: (Any) -> Any
582 # type: (bytes) -> bytes
583 '''convert a local, possibly-binary string into UTF-8b
583 '''convert a local, possibly-binary string into UTF-8b
584
584
585 This is intended as a generic method to preserve data when working
585 This is intended as a generic method to preserve data when working
General Comments 0
You need to be logged in to leave comments. Login now