Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index fe50e36..8a10bab 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -981,16 +981,12 @@
 Parse XML data from file-like object.");
 
 static PyObject *
-xmlparse_ParseFile(xmlparseobject *self, PyObject *args)
+xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
 {
     int rv = 1;
-    PyObject *f;
     FILE *fp;
     PyObject *readmethod = NULL;
 
-    if (!PyArg_ParseTuple(args, "O:ParseFile", &f))
-        return NULL;
-
     if (PyFile_Check(f)) {
         fp = PyFile_AsFile(f);
     }
@@ -1062,11 +1058,8 @@
 Return base URL string for the parser.");
 
 static PyObject *
-xmlparse_GetBase(xmlparseobject *self, PyObject *args)
+xmlparse_GetBase(xmlparseobject *self, PyObject *unused)
 {
-    if (!PyArg_ParseTuple(args, ":GetBase"))
-        return NULL;
-
     return Py_BuildValue("z", XML_GetBase(self->itself));
 }
 
@@ -1077,29 +1070,21 @@
 for an element with many attributes), not all of the text may be available.");
 
 static PyObject *
-xmlparse_GetInputContext(xmlparseobject *self, PyObject *args)
+xmlparse_GetInputContext(xmlparseobject *self, PyObject *unused)
 {
-    PyObject *result = NULL;
+    if (self->in_callback) {
+        int offset, size;
+        const char *buffer
+            = XML_GetInputContext(self->itself, &offset, &size);
 
-    if (PyArg_ParseTuple(args, ":GetInputContext")) {
-        if (self->in_callback) {
-            int offset, size;
-            const char *buffer
-                = XML_GetInputContext(self->itself, &offset, &size);
-
-            if (buffer != NULL)
-                result = PyString_FromStringAndSize(buffer + offset, size - offset);
-            else {
-                result = Py_None;
-                Py_INCREF(result);
-            }
-        }
-        else {
-            result = Py_None;
-            Py_INCREF(result);
-        }
+        if (buffer != NULL)
+            return PyString_FromStringAndSize(buffer + offset,
+                                              size - offset);
+        else
+            Py_RETURN_NONE;
     }
-    return result;
+    else
+        Py_RETURN_NONE;
 }
 
 PyDoc_STRVAR(xmlparse_ExternalEntityParserCreate__doc__,
@@ -1228,7 +1213,7 @@
     PyObject *flagobj = NULL;
     XML_Bool flag = XML_TRUE;
     enum XML_Error rc;
-    if (!PyArg_ParseTuple(args, "|O:UseForeignDTD", &flagobj))
+    if (!PyArg_UnpackTuple(args, "UseForeignDTD", 0, 1, &flagobj))
         return NULL;
     if (flagobj != NULL)
         flag = PyObject_IsTrue(flagobj) ? XML_TRUE : XML_FALSE;
@@ -1245,17 +1230,17 @@
     {"Parse",	  (PyCFunction)xmlparse_Parse,
 		  METH_VARARGS,	xmlparse_Parse__doc__},
     {"ParseFile", (PyCFunction)xmlparse_ParseFile,
-		  METH_VARARGS,	xmlparse_ParseFile__doc__},
+		  METH_O,	xmlparse_ParseFile__doc__},
     {"SetBase",   (PyCFunction)xmlparse_SetBase,
 		  METH_VARARGS, xmlparse_SetBase__doc__},
     {"GetBase",   (PyCFunction)xmlparse_GetBase,
-		  METH_VARARGS, xmlparse_GetBase__doc__},
+		  METH_NOARGS, xmlparse_GetBase__doc__},
     {"ExternalEntityParserCreate", (PyCFunction)xmlparse_ExternalEntityParserCreate,
 	 	  METH_VARARGS, xmlparse_ExternalEntityParserCreate__doc__},
     {"SetParamEntityParsing", (PyCFunction)xmlparse_SetParamEntityParsing,
 		  METH_VARARGS, xmlparse_SetParamEntityParsing__doc__},
     {"GetInputContext", (PyCFunction)xmlparse_GetInputContext,
-		  METH_VARARGS, xmlparse_GetInputContext__doc__},
+		  METH_NOARGS, xmlparse_GetInputContext__doc__},
 #if XML_COMBINED_VERSION >= 19505
     {"UseForeignDTD", (PyCFunction)xmlparse_UseForeignDTD,
 		  METH_VARARGS, xmlparse_UseForeignDTD__doc__},