[New-bugs-announce] [issue30216] xdrlib.Unpacker.unpack_string returns bytes (docs say should be str)

Rupert Nash report at bugs.python.org
Sun Apr 30 07:12:49 EDT 2017


New submission from Rupert Nash:

According to the docs this method should return a str, but it returns bytes
https://docs.python.org/3.6/library/xdrlib.html#xdrlib.Unpacker.unpack_string

I can see three options:
 a default encoding should be applied
 the documentation updated to make clear this returns bytes
 the method removed and just rely on the existing unpack_bytes which does what you'd expect (and in fact the two methods are aliases)

----------
components: Library (Lib)
messages: 292624
nosy: rnash
priority: normal
severity: normal
status: open
title: xdrlib.Unpacker.unpack_string returns bytes (docs say should be str)
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30216>
_______________________________________


More information about the New-bugs-announce mailing list