Merged revisions 74316,74335 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r74316 | alexandre.vassalotti | 2009-08-05 01:19:13 +0200 (Mi, 05 Aug 2009) | 4 lines

  Issue 5449: Fix io.BytesIO to not accept arbitrary keywords

  Patch contributed by Erick Tryzelaar.
........
  r74335 | philip.jenvey | 2009-08-06 22:00:08 +0200 (Do, 06 Aug 2009) | 1 line

  typo
........
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 7675846..cafe4a2 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -642,9 +642,11 @@
 static int
 bytesio_init(bytesio *self, PyObject *args, PyObject *kwds)
 {
+    char *kwlist[] = {"initial_bytes", NULL};
     PyObject *initvalue = NULL;
 
-    if (!PyArg_ParseTuple(args, "|O:BytesIO", &initvalue))
+    if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:BytesIO", kwlist,
+                                     &initvalue))
         return -1;
 
     /* In case, __init__ is called multiple times. */