[Python-checkins] r53816 - in python/branches/release25-maint: Misc/NEWS Modules/datetimemodule.c

martin.v.loewis python-checkins at python.org
Sun Feb 18 09:50:39 CET 2007


Author: martin.v.loewis
Date: Sun Feb 18 09:50:38 2007
New Revision: 53816

Modified:
   python/branches/release25-maint/Misc/NEWS
   python/branches/release25-maint/Modules/datetimemodule.c
Log:
Revert r53672, just fix signature of time_isoformat instead.


Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS	(original)
+++ python/branches/release25-maint/Misc/NEWS	Sun Feb 18 09:50:38 2007
@@ -111,7 +111,7 @@
 
 - Patch #1657276: Make NETLINK_DNRTMSG conditional.
 
-- Bug #1653736: Complain about keyword arguments to time.isoformat.
+- Bug #1653736: Fix signature of time_isoformat.
 
 - operator.count() now raises an OverflowError when the count reaches sys.maxint.
 

Modified: python/branches/release25-maint/Modules/datetimemodule.c
==============================================================================
--- python/branches/release25-maint/Modules/datetimemodule.c	(original)
+++ python/branches/release25-maint/Modules/datetimemodule.c	Sun Feb 18 09:50:38 2007
@@ -3166,8 +3166,11 @@
 	return PyObject_CallMethod((PyObject *)self, "isoformat", "()");
 }
 
+/* Even though this silently ignores all arguments, it cannot
+   be fixed to reject them in release25-maint */
 static PyObject *
-time_isoformat(PyDateTime_Time *self, PyObject *unused)
+time_isoformat(PyDateTime_Time *self, PyObject *unused_args, 
+	       PyObject *unused_keywords)
 {
 	char buf[100];
 	PyObject *result;
@@ -3411,7 +3414,7 @@
 
 static PyMethodDef time_methods[] = {
 
-	{"isoformat",   (PyCFunction)time_isoformat,	METH_NOARGS,
+	{"isoformat",   (PyCFunction)time_isoformat,	METH_KEYWORDS,
 	 PyDoc_STR("Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]"
 	 	   "[+HH:MM].")},
 


More information about the Python-checkins mailing list