[Python-checkins] python/dist/src/Modules symtablemodule.c,1.6,1.7 parsermodule.c,2.72,2.73 cPickle.c,2.93,2.94 operator.c,2.22,2.23

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Tue, 13 Aug 2002 15:20:43 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv11602/Modules

Modified Files:
	symtablemodule.c parsermodule.c cPickle.c operator.c 
Log Message:
Allow more docstrings to be removed during compilation in some modules

Index: symtablemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/symtablemodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** symtablemodule.c	2 Aug 2002 02:27:13 -0000	1.6
--- symtablemodule.c	13 Aug 2002 22:20:40 -0000	1.7
***************
*** 40,44 ****
  static PyMethodDef symtable_methods[] = {
  	{"symtable",	symtable_symtable,	METH_VARARGS,
! 	 "Return symbol and scope dictionaries used internally by compiler."},
  	{NULL,		NULL}		/* sentinel */
  };
--- 40,45 ----
  static PyMethodDef symtable_methods[] = {
  	{"symtable",	symtable_symtable,	METH_VARARGS,
! 	 PyDoc_STR("Return symbol and scope dictionaries"
! 	 	   " used internally by compiler.")},
  	{NULL,		NULL}		/* sentinel */
  };

Index: parsermodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.72
retrieving revision 2.73
diff -C2 -d -r2.72 -r2.73
*** parsermodule.c	23 Jul 2002 06:31:13 -0000	2.72
--- parsermodule.c	13 Aug 2002 22:20:40 -0000	2.73
***************
*** 443,455 ****
  parser_methods[] = {
      {"compile",         (PyCFunction)parser_compilest,  PUBLIC_METHOD_TYPE,
!         "Compile this ST object into a code object."},
      {"isexpr",          (PyCFunction)parser_isexpr,     PUBLIC_METHOD_TYPE,
!         "Determines if this ST object was created from an expression."},
      {"issuite",         (PyCFunction)parser_issuite,    PUBLIC_METHOD_TYPE,
!         "Determines if this ST object was created from a suite."},
      {"tolist",          (PyCFunction)parser_st2list,    PUBLIC_METHOD_TYPE,
!         "Creates a list-tree representation of this ST."},
      {"totuple",         (PyCFunction)parser_st2tuple,   PUBLIC_METHOD_TYPE,
!         "Creates a tuple-tree representation of this ST."},
  
      {NULL, NULL, 0, NULL}
--- 443,455 ----
  parser_methods[] = {
      {"compile",         (PyCFunction)parser_compilest,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Compile this ST object into a code object.")},
      {"isexpr",          (PyCFunction)parser_isexpr,     PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Determines if this ST object was created from an expression.")},
      {"issuite",         (PyCFunction)parser_issuite,    PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Determines if this ST object was created from a suite.")},
      {"tolist",          (PyCFunction)parser_st2list,    PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a list-tree representation of this ST.")},
      {"totuple",         (PyCFunction)parser_st2tuple,   PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a tuple-tree representation of this ST.")},
  
      {NULL, NULL, 0, NULL}
***************
*** 2817,2851 ****
  static PyMethodDef parser_functions[] =  {
      {"ast2tuple",       (PyCFunction)parser_st2tuple,  PUBLIC_METHOD_TYPE,
!         "Creates a tuple-tree representation of an ST."},
      {"ast2list",        (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
!         "Creates a list-tree representation of an ST."},
      {"compileast",      (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE,
!         "Compiles an ST object into a code object."},
      {"compilest",      (PyCFunction)parser_compilest,  PUBLIC_METHOD_TYPE,
!         "Compiles an ST object into a code object."},
      {"expr",            (PyCFunction)parser_expr,      PUBLIC_METHOD_TYPE,
!         "Creates an ST object from an expression."},
      {"isexpr",          (PyCFunction)parser_isexpr,    PUBLIC_METHOD_TYPE,
!         "Determines if an ST object was created from an expression."},
      {"issuite",         (PyCFunction)parser_issuite,   PUBLIC_METHOD_TYPE,
!         "Determines if an ST object was created from a suite."},
      {"suite",           (PyCFunction)parser_suite,     PUBLIC_METHOD_TYPE,
!         "Creates an ST object from a suite."},
      {"sequence2ast",    (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         "Creates an ST object from a tree representation."},
      {"sequence2st",     (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         "Creates an ST object from a tree representation."},
      {"st2tuple",        (PyCFunction)parser_st2tuple,  PUBLIC_METHOD_TYPE,
!         "Creates a tuple-tree representation of an ST."},
      {"st2list",         (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
!         "Creates a list-tree representation of an ST."},
      {"tuple2ast",       (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         "Creates an ST object from a tree representation."},
      {"tuple2st",        (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         "Creates an ST object from a tree representation."},
  
      /* private stuff: support pickle module */
      {"_pickler",        (PyCFunction)parser__pickler,  METH_VARARGS,
!         "Returns the pickle magic to allow ST objects to be pickled."},
  
      {NULL, NULL, 0, NULL}
--- 2817,2851 ----
  static PyMethodDef parser_functions[] =  {
      {"ast2tuple",       (PyCFunction)parser_st2tuple,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a tuple-tree representation of an ST.")},
      {"ast2list",        (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a list-tree representation of an ST.")},
      {"compileast",      (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Compiles an ST object into a code object.")},
      {"compilest",      (PyCFunction)parser_compilest,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Compiles an ST object into a code object.")},
      {"expr",            (PyCFunction)parser_expr,      PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from an expression.")},
      {"isexpr",          (PyCFunction)parser_isexpr,    PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Determines if an ST object was created from an expression.")},
      {"issuite",         (PyCFunction)parser_issuite,   PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Determines if an ST object was created from a suite.")},
      {"suite",           (PyCFunction)parser_suite,     PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from a suite.")},
      {"sequence2ast",    (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from a tree representation.")},
      {"sequence2st",     (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from a tree representation.")},
      {"st2tuple",        (PyCFunction)parser_st2tuple,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a tuple-tree representation of an ST.")},
      {"st2list",         (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates a list-tree representation of an ST.")},
      {"tuple2ast",       (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from a tree representation.")},
      {"tuple2st",        (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
!         PyDoc_STR("Creates an ST object from a tree representation.")},
  
      /* private stuff: support pickle module */
      {"_pickler",        (PyCFunction)parser__pickler,  METH_VARARGS,
!         PyDoc_STR("Returns the pickle magic to allow ST objects to be pickled.")},
  
      {NULL, NULL, 0, NULL}

Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.93
retrieving revision 2.94
diff -C2 -d -r2.93 -r2.94
*** cPickle.c	4 Aug 2002 08:20:23 -0000	2.93
--- cPickle.c	13 Aug 2002 22:20:40 -0000	2.94
***************
*** 2296,2305 ****
  {
    {"dump",          (PyCFunction)Pickler_dump,  METH_VARARGS,
!    "dump(object) --"
!    "Write an object in pickle format to the object's pickle stream"},
    {"clear_memo",  (PyCFunction)Pickle_clear_memo,  METH_NOARGS,
!    "clear_memo() -- Clear the picklers memo"},
    {"getvalue",  (PyCFunction)Pickle_getvalue,  METH_VARARGS,
!    "getvalue() -- Finish picking a list-based pickle"},
    {NULL,                NULL}           /* sentinel */
  };
--- 2296,2305 ----
  {
    {"dump",          (PyCFunction)Pickler_dump,  METH_VARARGS,
!    PyDoc_STR("dump(object) -- "
!    "Write an object in pickle format to the object's pickle stream")},
    {"clear_memo",  (PyCFunction)Pickle_clear_memo,  METH_NOARGS,
!    PyDoc_STR("clear_memo() -- Clear the picklers memo")},
    {"getvalue",  (PyCFunction)Pickle_getvalue,  METH_VARARGS,
!    PyDoc_STR("getvalue() -- Finish picking a list-based pickle")},
    {NULL,                NULL}           /* sentinel */
  };
***************
*** 4302,4308 ****
  static struct PyMethodDef Unpickler_methods[] = {
    {"load",         (PyCFunction)Unpickler_load,   METH_VARARGS,
!    "load() -- Load a pickle"
    },
    {"noload",         (PyCFunction)Unpickler_noload,   METH_VARARGS,
     "noload() -- not load a pickle, but go through most of the motions\n"
     "\n"
--- 4302,4309 ----
  static struct PyMethodDef Unpickler_methods[] = {
    {"load",         (PyCFunction)Unpickler_load,   METH_VARARGS,
!    PyDoc_STR("load() -- Load a pickle")
    },
    {"noload",         (PyCFunction)Unpickler_noload,   METH_VARARGS,
+    PyDoc_STR(
     "noload() -- not load a pickle, but go through most of the motions\n"
     "\n"
***************
*** 4310,4314 ****
     "any objects or importing any modules.  It can also be used to find all\n"
     "persistent references without instantiating any objects or importing\n"
!    "any modules.\n"
    },
    {NULL,              NULL}           /* sentinel */
--- 4311,4315 ----
     "any objects or importing any modules.  It can also be used to find all\n"
     "persistent references without instantiating any objects or importing\n"
!    "any modules.\n")
    },
    {NULL,              NULL}           /* sentinel */
***************
*** 4649,4680 ****
  static struct PyMethodDef cPickle_methods[] = {
    {"dump",         (PyCFunction)cpm_dump,         METH_VARARGS,
!    "dump(object, file, [binary]) --"
     "Write an object in pickle format to the given file\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then the\n"
     "pickle will be written in binary format, which is more space and\n"
!    "computationally efficient. \n"
    },
    {"dumps",        (PyCFunction)cpm_dumps,        METH_VARARGS,
!    "dumps(object, [binary]) --"
     "Return a string containing an object in pickle format\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then the\n"
     "pickle will be written in binary format, which is more space and\n"
!    "computationally efficient. \n"
    },
    {"load",         (PyCFunction)cpm_load,         METH_VARARGS,
!    "load(file) -- Load a pickle from the given file"},
    {"loads",        (PyCFunction)cpm_loads,        METH_VARARGS,
!    "loads(string) -- Load a pickle from the given string"},
    {"Pickler",      (PyCFunction)get_Pickler,      METH_VARARGS,
!    "Pickler(file, [binary]) -- Create a pickler\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then\n"
     "pickles will be written in binary format, which is more space and\n"
!    "computationally efficient. \n"
    },
    {"Unpickler",    (PyCFunction)get_Unpickler,    METH_VARARGS,
!    "Unpickler(file) -- Create an unpickler"},
    { NULL, NULL }
  };
--- 4650,4681 ----
  static struct PyMethodDef cPickle_methods[] = {
    {"dump",         (PyCFunction)cpm_dump,         METH_VARARGS,
!    PyDoc_STR("dump(object, file, [binary]) --"
     "Write an object in pickle format to the given file\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then the\n"
     "pickle will be written in binary format, which is more space and\n"
!    "computationally efficient. \n")
    },
    {"dumps",        (PyCFunction)cpm_dumps,        METH_VARARGS,
!    PyDoc_STR("dumps(object, [binary]) --"
     "Return a string containing an object in pickle format\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then the\n"
     "pickle will be written in binary format, which is more space and\n"
!    "computationally efficient. \n")
    },
    {"load",         (PyCFunction)cpm_load,         METH_VARARGS,
!    PyDoc_STR("load(file) -- Load a pickle from the given file")},
    {"loads",        (PyCFunction)cpm_loads,        METH_VARARGS,
!    PyDoc_STR("loads(string) -- Load a pickle from the given string")},
    {"Pickler",      (PyCFunction)get_Pickler,      METH_VARARGS,
!    PyDoc_STR("Pickler(file, [binary]) -- Create a pickler\n"
     "\n"
     "If the optional argument, binary, is provided and is true, then\n"
     "pickles will be written in binary format, which is more space and\n"
!    "computationally efficient. \n")
    },
    {"Unpickler",    (PyCFunction)get_Unpickler,    METH_VARARGS,
!    PyDoc_STR("Unpickler(file) -- Create an unpickler")},
    { NULL, NULL }
  };

Index: operator.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/operator.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -d -r2.22 -r2.23
*** operator.c	2 Aug 2002 02:27:13 -0000	2.22
--- operator.c	13 Aug 2002 22:20:41 -0000	2.23
***************
*** 147,153 ****
  #undef spam1
  #undef spam2
! #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, DOC},
  #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \
! 			   {#ALTOP, op_##OP, METH_VARARGS, DOC}, 
  
  static struct PyMethodDef operator_methods[] = {
--- 147,153 ----
  #undef spam1
  #undef spam2
! #define spam1(OP,DOC) {#OP, OP, METH_VARARGS, PyDoc_STR(DOC)},
  #define spam2(OP,ALTOP,DOC) {#OP, op_##OP, METH_VARARGS, DOC}, \
! 			   {#ALTOP, op_##OP, METH_VARARGS, PyDoc_STR(DOC)}, 
  
  static struct PyMethodDef operator_methods[] = {