[New-bugs-announce] [issue2895] Crash in ParseTupleAndKeywords when passing byte string keywords
Stefan Behnel
report at bugs.python.org
Fri May 16 19:19:22 CEST 2008
New submission from Stefan Behnel <scoder at users.sourceforge.net>:
Using 3.0a5, the following code crashes in vgetargskeywords (getargs.c:1542)
>>> d = {b"encoding": "abc"}
>>> str(b"abc", **d)
It should raise a TypeError instead, i.e. line 1535 should read
if (!PyUnicode_Check(key)) {
instead of
if (!PyString_Check(key) && !PyUnicode_Check(key)) {
----------
components: Interpreter Core
messages: 66958
nosy: scoder
severity: normal
status: open
title: Crash in ParseTupleAndKeywords when passing byte string keywords
type: crash
versions: Python 3.0
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2895>
__________________________________
More information about the New-bugs-announce
mailing list