Message4507
fileobj.close() is a method that's implemented using
PyArg_NoArgs() and METH_OLDARGS. It allows bogus
keyword arguments, which are ignored, e.g.:
>>> fp = open('/tmp/foo', 'w')
>>> fp.close(bogus=1)
Also,
>>> fp = open('/tmp/foo', 'w')
>>> fp.write('hello', bogus=1)
TypeError: argument must be string or read-only
character buffer, not int
>>> fp.write('hello', bogus='world')
>>> ^D
% cat /tmp/foo
hello
The fix is to convert these to use METH_VARARGS. I'm
submitting this bug report so it doesn't get forgotten.
|
|
Date |
User |
Action |
Args |
2007-08-23 13:54:15 | admin | link | issue418392 messages |
2007-08-23 13:54:15 | admin | create | |
|