Document deprecation of mi.count() and ds.Count().
authorVille Skyttä <ville.skytta@iki.fi>
Fri, 19 Mar 2010 18:09:15 +0000 (20:09 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 24 Mar 2010 08:37:22 +0000 (10:37 +0200)
python/rpmds-py.c
python/rpmmi-py.c

index ac1b6b1..49a02e4 100644 (file)
@@ -196,7 +196,7 @@ static PyObject * rpmds_Rpmlib(rpmdsObject * s)
 
 static struct PyMethodDef rpmds_methods[] = {
  {"Count",     (PyCFunction)rpmds_Count,       METH_NOARGS,
-       "ds.Count -> Count      - Return no. of elements.\n" },
+       "Deprecated, use len(ds) instead.\n" },
  {"Ix",                (PyCFunction)rpmds_Ix,          METH_NOARGS,
        "ds.Ix -> Ix            - Return current element index.\n" },
  {"DNEVR",     (PyCFunction)rpmds_DNEVR,       METH_NOARGS,
index b7bfb1b..5287671 100644 (file)
@@ -118,7 +118,7 @@ static struct PyMethodDef rpmmi_methods[] = {
     {"instance",    (PyCFunction) rpmmi_Instance,      METH_NOARGS,
        NULL },
     {"count",       (PyCFunction) rpmmi_Count,         METH_NOARGS,
-       NULL },
+"Deprecated, use len(mi) instead.\n" },
     {"pattern",            (PyCFunction) rpmmi_Pattern,        METH_VARARGS|METH_KEYWORDS,
 "mi.pattern(TagN, mire_type, pattern)\n\
 - Set a secondary match pattern on tags from retrieved header.\n" },