This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients
Date 2001-04-23.23:02:29
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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. 
History
Date User Action Args
2007-08-23 13:54:15adminlinkissue418392 messages
2007-08-23 13:54:15admincreate