summaryrefslogtreecommitdiff
path: root/python/tag.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-03 17:27:33 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-03 17:27:33 +0200
commit7051066cf258caa2a3fd45271faa3d46b8a6d98a (patch)
tree45efe66d83002d258e739214050a262c75e672cd /python/tag.cc
parent7d6f85c475d5f50e0c54814cd8b644e38147b282 (diff)
downloadpython-apt-7051066cf258caa2a3fd45271faa3d46b8a6d98a.tar.gz
python/: Convert most names to PEP8 naming conventions (except Version,PackageFile,MetaIndex).
On our way to close Bug#481061, this converts almost all names to PEP 8 naming conventions. Missing are now apt_pkg.Version, apt_pkg.PackageFile, apt_pkg.MetaIndex and apt.progress.*. In case of the missing apt_pkg classes, they are not converted yet because they do not use getset descriptors yet. apt.progress.* has not been converted yet because the extension interacts with it, and we first need to modify the extension to recognize the new names, as well as the old names (old applications shouldn't break).
Diffstat (limited to 'python/tag.cc')
-rw-r--r--python/tag.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/tag.cc b/python/tag.cc
index bc23e98b..846123ba 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -377,13 +377,20 @@ PyObject *RewriteSection(PyObject *self,PyObject *Args)
static PyMethodDef TagSecMethods[] =
{
// Query
+ {"find",TagSecFind,METH_VARARGS,doc_Find},
+ {"findflag",TagSecFindFlag,METH_VARARGS,doc_FindFlag},
+ {"bytes",TagSecBytes,METH_VARARGS,doc_Bytes},
+#ifdef COMPAT_0_7
{"Find",TagSecFind,METH_VARARGS,doc_Find},
{"FindFlag",TagSecFindFlag,METH_VARARGS,doc_FindFlag},
{"Bytes",TagSecBytes,METH_VARARGS,doc_Bytes},
+#endif
// Python Special
{"keys",TagSecKeys,METH_VARARGS,doc_Keys},
+#if PY_MAJOR_VERSION < 3
{"has_key",TagSecExists,METH_VARARGS,doc_Exists},
+#endif
{"get",TagSecFind,METH_VARARGS,doc_Find},
{}
};
@@ -448,9 +455,14 @@ PyTypeObject TagSecType =
static PyMethodDef TagFileMethods[] =
{
// Query
+ {"step",TagFileStep,METH_VARARGS,doc_Step},
+ {"offset",TagFileOffset,METH_VARARGS,doc_Offset},
+ {"jump",TagFileJump,METH_VARARGS,doc_Jump},
+#ifdef COMPAT_0_7
{"Step",TagFileStep,METH_VARARGS,doc_Step},
{"Offset",TagFileOffset,METH_VARARGS,doc_Offset},
{"Jump",TagFileJump,METH_VARARGS,doc_Jump},
+#endif
{}
};
@@ -463,7 +475,10 @@ static PyObject *TagFileGetSection(PyObject *Self,void*) {
}
static PyGetSetDef TagFileGetSet[] = {
+ {"section",TagFileGetSection,0,"Return a TagSection.",0},
+#ifdef COMPAT_0_7
{"Section",TagFileGetSection,0,"Return a TagSection.",0},
+#endif
{}
};