Changeset 4841:448f805d5e88


Ignore:
Timestamp:
05/24/07 23:13:05 (6 years ago)
Author:
Robert Bradshaw <robertwb@…>
Branch:
default
Message:

whitespace annoyances

Location:
sage/ext
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • sage/ext/python_bool.pxi

    r1765 r4841  
    3030    # Return Py_True from a function, properly incrementing its reference count.  
    3131 
    32     object PyBool_FromLong(     long v) 
     32    object PyBool_FromLong(long v) 
    3333    # Return value: New reference. 
    3434    # Return a new reference to Py_True or Py_False depending on the truth value of v.  
  • sage/ext/python_complex.pxi

    r1765 r4841  
    1515    # types.ComplexType. 
    1616 
    17     int PyComplex_Check(        object p) 
     17    int PyComplex_Check(object p) 
    1818    # Return true if its argument is a PyComplexObject or a subtype of 
    1919    # PyComplexObject. 
    2020 
    21     int PyComplex_CheckExact(   object p) 
     21    int PyComplex_CheckExact(object p) 
    2222    # Return true if its argument is a PyComplexObject, but not a subtype of PyComplexObject. 
    2323 
    24     object PyComplex_FromCComplex(      Py_complex v) 
     24    object PyComplex_FromCComplex(Py_complex v) 
    2525    # Return value: New reference. 
    2626    # Create a new Python complex number object from a C Py_complex value.  
    2727 
    28     object PyComplex_FromDoubles(       double real, double imag) 
     28    object PyComplex_FromDoubles(double real, double imag) 
    2929    # Return value: New reference. 
    3030    # Return a new PyComplexObject object from real and imag.  
    3131 
    32     double PyComplex_RealAsDouble(      object op) 
     32    double PyComplex_RealAsDouble(object op) 
    3333    # Return the real part of op as a C double.  
    3434 
    35     double PyComplex_ImagAsDouble(      object op) 
     35    double PyComplex_ImagAsDouble(object op) 
    3636    # Return the imaginary part of op as a C double.  
    3737 
    38     Py_complex PyComplex_AsCComplex(    object op) 
     38    Py_complex PyComplex_AsCComplex(object op) 
    3939    # Return the Py_complex value of the complex number op.  
  • sage/ext/python_dict.pxi

    r1765 r4841  
    99    # This instance of PyTypeObject represents the Python dictionary type. This is exposed to Python programs as dict and types.DictType.  
    1010 
    11     int PyDict_Check(   object p) 
     11    int PyDict_Check(object p) 
    1212    # Return true if p is a dict object or an instance of a subtype of 
    1313    # the dict type.  
    1414 
    15     int PyDict_CheckExact(      object p) 
     15    int PyDict_CheckExact(object p) 
    1616    # Return true if p is a dict object, but not an instance of a 
    1717    # subtype of the dict type. 
    1818 
    19     object PyDict_New(  ) 
     19    object PyDict_New() 
    2020    # Return value: New reference. 
    2121    # Return a new empty dictionary, or NULL on failure.  
    2222 
    23     object PyDictProxy_New(     object dict) 
     23    object PyDictProxy_New(object dict) 
    2424    # Return value: New reference. 
    2525    # Return a proxy object for a mapping which enforces read-only 
     
    2727    # modification of the dictionary for non-dynamic class types.  
    2828 
    29     void PyDict_Clear(  object p) 
     29    void PyDict_Clear(object p) 
    3030    # Empty an existing dictionary of all key-value pairs.  
    3131 
    32     int PyDict_Contains(        object p, object key) 
     32    int PyDict_Contains(object p, object key) 
    3333    # Determine if dictionary p contains key. If an item in p is 
    3434    # matches key, return 1, otherwise return 0. On error, return 
    3535    # -1. This is equivalent to the Python expression "key in p".  
    3636 
    37     object PyDict_Copy( object p) 
     37    object PyDict_Copy(object p) 
    3838    # Return value: New reference. 
    3939    # Return a new dictionary that contains the same key-value pairs as p. 
    4040 
    41     int PyDict_SetItem( object p, object key, object val) 
     41    int PyDict_SetItem(object p, object key, object val) 
    4242    # Insert value into the dictionary p with a key of key. key must 
    4343    # be hashable; if it isn't, TypeError will be raised. Return 0 on 
    4444    # success or -1 on failure. 
    4545 
    46     int PyDict_SetItemString(   object p, char *key, object val) 
     46    int PyDict_SetItemString(object p, char *key, object val) 
    4747    # Insert value into the dictionary p using key as a key. key 
    4848    # should be a char*. The key object is created using 
    4949    # PyString_FromString(key). Return 0 on success or -1 on failure. 
    5050 
    51     int PyDict_DelItem( object p, object key) 
     51    int PyDict_DelItem(object p, object key) 
    5252    # Remove the entry in dictionary p with key key. key must be 
    5353    # hashable; if it isn't, TypeError is raised. Return 0 on success 
    5454    # or -1 on failure. 
    5555 
    56     int PyDict_DelItemString(   object p, char *key) 
     56    int PyDict_DelItemString(object p, char *key) 
    5757    # Remove the entry in dictionary p which has a key specified by 
    5858    # the string key. Return 0 on success or -1 on failure. 
    5959 
    60     PyObject* PyDict_GetItem(   object p, object key) 
     60    PyObject* PyDict_GetItem(object p, object key) 
    6161    # Return value: Borrowed reference. 
    6262    # Return the object from dictionary p which has a key key. Return 
     
    6464    # exception. 
    6565 
    66     PyObject* PyDict_GetItemString(     object p, char *key) 
     66    PyObject* PyDict_GetItemString(object p, char *key) 
    6767    # Return value: Borrowed reference. 
    6868    # This is the same as PyDict_GetItem(), but key is specified as a 
    6969    # char*, rather than a PyObject*. 
    7070 
    71     object PyDict_Items(        object p) 
     71    object PyDict_Items(object p) 
    7272    # Return value: New reference. 
    7373    # Return a PyListObject containing all the items from the 
     
    7575    # Library Reference). 
    7676 
    77     object PyDict_Keys( object p) 
     77    object PyDict_Keys(object p) 
    7878    # Return value: New reference. 
    7979    # Return a PyListObject containing all the keys from the 
     
    8181    # Library Reference). 
    8282 
    83     object PyDict_Values(       object p) 
     83    object PyDict_Values(object p) 
    8484    # Return value: New reference. 
    8585    # Return a PyListObject containing all the values from the 
     
    8787    # Python Library Reference). 
    8888 
    89     Py_ssize_t PyDict_Size(     object p) 
     89    Py_ssize_t PyDict_Size(object p) 
    9090    # Return the number of items in the dictionary. This is equivalent to "len(p)" on a dictionary. 
    9191 
    92     int PyDict_Next(    object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pvalue) 
     92    int PyDict_Next(object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pvalue) 
    9393    # Iterate over all key-value pairs in the dictionary p. The int 
    9494    # referred to by ppos must be initialized to 0 prior to the first 
     
    129129    # } 
    130130 
    131     int PyDict_Merge(   object a, object b, int override) 
     131    int PyDict_Merge(object a, object b, int override) 
    132132    # Iterate over mapping object b adding key-value pairs to 
    133133    # dictionary a. b may be a dictionary, or any object supporting 
     
    138138    # raised. 
    139139 
    140     int PyDict_Update(  object a, object b) 
     140    int PyDict_Update(object a, object b) 
    141141    # This is the same as PyDict_Merge(a, b, 1) in C, or a.update(b) 
    142142    # in Python. Return 0 on success or -1 if an exception was raised. 
    143143 
    144     int PyDict_MergeFromSeq2(   object a, object seq2, int override) 
     144    int PyDict_MergeFromSeq2(object a, object seq2, int override) 
    145145    # Update or merge into dictionary a, from the key-value pairs in 
    146146    # seq2. seq2 must be an iterable object producing iterable objects 
  • sage/ext/python_exc.pxi

    r1765 r4841  
    4040    # set. (Otherwise it will cause a fatal error!) 
    4141 
    42     PyObject* PyErr_Occurred(   ) 
     42    PyObject* PyErr_Occurred() 
    4343    # Return value: Borrowed reference. 
    4444    # Test whether the error indicator is set. If set, return the 
     
    5353    # subclass of the expected exception.) 
    5454 
    55     int PyErr_ExceptionMatches( object exc) 
     55    int PyErr_ExceptionMatches(object exc) 
    5656    # Equivalent to "PyErr_GivenExceptionMatches(PyErr_Occurred(), 
    5757    # exc)". This should only be called when an exception is actually 
     
    5959    # been raised. 
    6060 
    61     int PyErr_GivenExceptionMatches(    object given, object exc) 
     61    int PyErr_GivenExceptionMatches(object given, object exc) 
    6262    # Return true if the given exception matches the exception in 
    6363    # exc. If exc is a class object, this also returns true when given 
     
    6666    # match. If given is NULL, a memory access violation will occur. 
    6767 
    68     void PyErr_NormalizeException(      PyObject** exc, PyObject** val, PyObject** tb) 
     68    void PyErr_NormalizeException(PyObject** exc, PyObject** val, PyObject** tb) 
    6969    # Under certain circumstances, the values returned by 
    7070    # PyErr_Fetch() below can be ``unnormalized'', meaning that *exc 
     
    7575    # performance. 
    7676 
    77     void PyErr_Clear(   ) 
     77    void PyErr_Clear() 
    7878    # Clear the error indicator. If the error indicator is not set, there is no effect.  
    7979 
    80     void PyErr_Fetch(   PyObject** ptype, PyObject** pvalue, PyObject** ptraceback) 
     80    void PyErr_Fetch(PyObject** ptype, PyObject** pvalue, PyObject** ptraceback) 
    8181    # Retrieve the error indicator into three variables whose 
    8282    # addresses are passed. If the error indicator is not set, set all 
     
    8888    # restore the error indicator temporarily. 
    8989 
    90     void PyErr_Restore( object type, object value, object traceback) 
     90    void PyErr_Restore(object type, object value, object traceback) 
    9191    # Set the error indicator from the three objects. If the error 
    9292    # indicator is already set, it is cleared first. If the objects 
     
    103103    # current exception state. 
    104104 
    105     void PyErr_SetString(       object type, char *message) 
     105    void PyErr_SetString(object type, char *message) 
    106106    # This is the most common way to set the error indicator. The 
    107107    # first argument specifies the exception type; it is normally one 
     
    110110    # error message; it is converted to a string object. 
    111111 
    112     void PyErr_SetObject(       object type, object value) 
     112    void PyErr_SetObject(object type, object value) 
    113113    # This function is similar to PyErr_SetString() but lets you 
    114114    # specify an arbitrary Python object for the ``value'' of the 
    115115    # exception. 
    116116 
    117     PyObject* PyErr_Format(     object exception, char *format, ...) 
     117    PyObject* PyErr_Format(object exception, char *format, ...) 
    118118    # Return value: Always NULL. 
    119119    # This function sets the error indicator and returns 
     
    123123    # parsed, but the width part is ignored. 
    124124 
    125     void PyErr_SetNone( object type) 
     125    void PyErr_SetNone(object type) 
    126126    # This is a shorthand for "PyErr_SetObject(type, Py_None)".  
    127127 
    128     int PyErr_BadArgument(      ) 
     128    int PyErr_BadArgument() 
    129129 
    130130    # This is a shorthand for "PyErr_SetString(PyExc_TypeError, 
     
    132132    # invoked with an illegal argument. It is mostly for internal use. 
    133133 
    134     PyObject* PyErr_NoMemory(   ) 
     134    PyObject* PyErr_NoMemory() 
    135135    # Return value: Always NULL. 
    136136    # This is a shorthand for "PyErr_SetNone(PyExc_MemoryError)"; it 
     
    138138    # PyErr_NoMemory();" when it runs out of memory. 
    139139 
    140     PyObject* PyErr_SetFromErrno(       object type) 
     140    PyObject* PyErr_SetFromErrno(object type) 
    141141    # Return value: Always NULL. 
    142142    # This is a convenience function to raise an exception when a C 
     
    153153    # error. 
    154154 
    155     PyObject* PyErr_SetFromErrnoWithFilename(   object type, char *filename) 
     155    PyObject* PyErr_SetFromErrnoWithFilename(object type, char *filename) 
    156156    # Return value: Always NULL.  Similar to PyErr_SetFromErrno(), 
    157157    # with the additional behavior that if filename is not NULL, it is 
     
    160160    # define the filename attribute of the exception instance. 
    161161 
    162     PyObject* PyErr_SetFromWindowsErr(  int ierr) 
     162    PyObject* PyErr_SetFromWindowsErr(int ierr) 
    163163    # Return value: Always NULL.  This is a convenience function to 
    164164    # raise WindowsError. If called with ierr of 0, the error code 
     
    172172    # always returns NULL. Availability: Windows. 
    173173 
    174     PyObject* PyErr_SetExcFromWindowsErr(       object type, int ierr) 
     174    PyObject* PyErr_SetExcFromWindowsErr(object type, int ierr) 
    175175    # Return value: Always NULL.  Similar to 
    176176    # PyErr_SetFromWindowsErr(), with an additional parameter 
     
    178178    # Windows. New in version 2.3. 
    179179 
    180     PyObject* PyErr_SetFromWindowsErrWithFilename(      int ierr, char *filename) 
     180    PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, char *filename) 
    181181    # Return value: Always NULL.  Similar to 
    182182    # PyErr_SetFromWindowsErr(), with the additional behavior that if 
     
    184184    # WindowsError as a third parameter. Availability: Windows. 
    185185 
    186     PyObject* PyErr_SetExcFromWindowsErrWithFilename(   object type, int ierr, char *filename) 
     186    PyObject* PyErr_SetExcFromWindowsErrWithFilename(object type, int ierr, char *filename) 
    187187    # Return value: Always NULL. 
    188188    # Similar to PyErr_SetFromWindowsErrWithFilename(), with an 
     
    190190    # raised. Availability: Windows. 
    191191 
    192     void PyErr_BadInternalCall( ) 
     192    void PyErr_BadInternalCall() 
    193193    # This is a shorthand for "PyErr_SetString(PyExc_TypeError, 
    194194    # message)", where message indicates that an internal operation 
     
    196196    # argument. It is mostly for internal use. 
    197197 
    198     int PyErr_WarnEx(   object category, char *message, int stacklevel) 
     198    int PyErr_WarnEx(object category, char *message, int stacklevel) 
    199199    # Issue a warning message. The category argument is a warning 
    200200    # category (see below) or NULL; the message argument is a message 
     
    205205    # and so forth. 
    206206 
    207     int PyErr_WarnExplicit(     object category, char *message, char *filename, int lineno, char *module, object registry) 
     207    int PyErr_WarnExplicit(object category, char *message, char *filename, int lineno, char *module, object registry) 
    208208    # Issue a warning message with explicit control over all warning 
    209209    # attributes. This is a straightforward wrapper around the Python 
     
    212212    # NULL to get the default effect described there. 
    213213 
    214     int PyErr_CheckSignals(     ) 
     214    int PyErr_CheckSignals() 
    215215    # This function interacts with Python's signal handling. It checks 
    216216    # whether a signal has been sent to the processes and if so, 
     
    229229    # holding the interpreter lock. 
    230230 
    231     PyObject* PyErr_NewException(       char *name, object base, object dict) 
     231    PyObject* PyErr_NewException(char *name, object base, object dict) 
    232232    # Return value: New reference. 
    233233    # This utility function creates and returns a new exception 
     
    237237    # Exception (accessible in C as PyExc_Exception). 
    238238 
    239     void PyErr_WriteUnraisable( object obj) 
     239    void PyErr_WriteUnraisable(object obj) 
    240240    # This utility function prints a warning message to sys.stderr 
    241241    # when an exception has been set but it is impossible for the 
  • sage/ext/python_function.pxi

    r1765 r4841  
    1212    # types.FunctionType. 
    1313 
    14     int PyFunction_Check(       object o) 
     14    int PyFunction_Check(object o) 
    1515    # Return true if o is a function object (has type 
    1616    # PyFunction_Type). The parameter must not be NULL. 
    1717 
    18     object PyFunction_New(      object code, object globals) 
     18    object PyFunction_New(object code, object globals) 
    1919    # Return value: New reference. 
    2020    # Return a new function object associated with the code object 
     
    2525    # NULL. 
    2626 
    27     PyObject* PyFunction_GetCode(       object op) 
     27    PyObject* PyFunction_GetCode(object op) 
    2828    # Return value: Borrowed reference. 
    2929    # Return the code object associated with the function object op.  
    3030 
    31     PyObject* PyFunction_GetGlobals(    object op) 
     31    PyObject* PyFunction_GetGlobals(object op) 
    3232    # Return value: Borrowed reference. 
    3333    # Return the globals dictionary associated with the function object op.  
    3434 
    35     PyObject* PyFunction_GetModule(     object op) 
     35    PyObject* PyFunction_GetModule(object op) 
    3636    # Return value: Borrowed reference. 
    3737    # Return the __module__ attribute of the function object op. This 
     
    3939    # to any other object by Python code. 
    4040 
    41     PyObject* PyFunction_GetDefaults(   object op) 
     41    PyObject* PyFunction_GetDefaults(object op) 
    4242    # Return value: Borrowed reference. 
    4343    # Return the argument default values of the function object 
    4444    # op. This can be a tuple of arguments or NULL. 
    4545 
    46     int PyFunction_SetDefaults( object op, object defaults) 
     46    int PyFunction_SetDefaults(object op, object defaults) 
    4747    # Set the argument default values for the function object 
    4848    # op. defaults must be Py_None or a tuple. 
    4949    # Raises SystemError and returns -1 on failure.  
    5050 
    51     PyObject* PyFunction_GetClosure(    object op) 
     51    PyObject* PyFunction_GetClosure(object op) 
    5252    # Return value: Borrowed reference. 
    5353    # Return the closure associated with the function object op. This 
    5454    # can be NULL or a tuple of cell objects. 
    5555 
    56     int PyFunction_SetClosure(  object op, object closure) 
     56    int PyFunction_SetClosure(object op, object closure) 
    5757    # Set the closure associated with the function object op. closure 
    5858    # must be Py_None or a tuple of cell objects. 
  • sage/ext/python_instance.pxi

    r1765 r4841  
    77    # PyTypeObject PyInstance_Type 
    88    # Type object for class instances.  
    9     # int PyInstance_Check(     PyObject *obj) 
     9    # int PyInstance_Check(PyObject *obj) 
    1010    # Return true if obj is an instance.  
    1111 
     
    1616    # object's constructor. 
    1717 
    18     object PyInstance_NewRaw(   object cls, object dict) 
     18    object PyInstance_NewRaw(object cls, object dict) 
    1919    # Return value: New reference. 
    2020    # Create a new instance of a specific class without calling its 
  • sage/ext/python_int.pxi

    r1765 r4841  
    4949    # exceeds LONG_MAX, a long integer object is returned. 
    5050 
    51     long PyInt_AsLong(object  io) 
     51    long PyInt_AsLong(object io) 
    5252    # Will first attempt to cast the object to a PyIntObject, if it is 
    5353    # not already one, and then return its value. If there is an 
     
    5656    # whether the value just happened to be -1. 
    5757 
    58     long PyInt_AS_LONG(object  io) 
     58    long PyInt_AS_LONG(object io) 
    5959    # Return the value of the object io. No error checking is performed.  
    6060 
    61     unsigned long PyInt_AsUnsignedLongMask(object  io) 
     61    unsigned long PyInt_AsUnsignedLongMask(object io) 
    6262    # Will first attempt to cast the object to a PyIntObject or 
    6363    # PyLongObject, if it is not already one, and then return its 
     
    6666 
    6767    ctypedef unsigned long long PY_LONG_LONG 
    68     PY_LONG_LONG PyInt_AsUnsignedLongLongMask(object  io) 
     68    PY_LONG_LONG PyInt_AsUnsignedLongLongMask(object io) 
    6969    # Will first attempt to cast the object to a PyIntObject or 
    7070    # PyLongObject, if it is not already one, and then return its 
    7171    # value as unsigned long long, without checking for overflow.  
    7272 
    73     Py_ssize_t PyInt_AsSsize_t(object  io) 
     73    Py_ssize_t PyInt_AsSsize_t(object io) 
    7474    # Will first attempt to cast the object to a PyIntObject or 
    7575    # PyLongObject, if it is not already one, and then return its 
  • sage/ext/python_list.pxi

    r1765 r4841  
    1313    # PyList_SetItem(). 
    1414     
    15     int PyList_Check(object  p) 
     15    int PyList_Check(object p) 
    1616    # Return true if p is a list object or an instance of a subtype of the list type. 
    1717     
    18     int PyList_CheckExact(object  p) 
     18    int PyList_CheckExact(object p) 
    1919    # Return true if p is a list object, but not an instance of a subtype of the list type. 
    2020 
    21     Py_ssize_t PyList_Size(     object list) 
     21    Py_ssize_t PyList_Size(object list) 
    2222    # Return the length of the list object in list; this is equivalent to "len(list)" on a list object.  
    2323 
    24     Py_ssize_t PyList_GET_SIZE( object list) 
     24    Py_ssize_t PyList_GET_SIZE(object list) 
    2525    # Macro form of PyList_Size() without error checking.  
    2626 
    27     PyObject* PyList_GetItem(object  list, Py_ssize_t index) 
     27    PyObject* PyList_GetItem(object list, Py_ssize_t index) 
    2828    # Return value: Borrowed reference.   
    2929    # Return the object at position pos in the list pointed to by 
     
    3232    # set an IndexError exception. 
    3333 
    34     PyObject* PyList_GET_ITEM(object  list, Py_ssize_t i) 
     34    PyObject* PyList_GET_ITEM(object list, Py_ssize_t i) 
    3535    # Return value: Borrowed reference. 
    3636    # Macro form of PyList_GetItem() without error checking.  
    3737 
    38     int PyList_SetItem(object  list, Py_ssize_t index, object item) 
     38    int PyList_SetItem(object list, Py_ssize_t index, object item) 
    3939    # Set the item at index index in list to item. Return 0 on success 
    4040    # or -1 on failure. Note: This function ``steals'' a reference to 
     
    4242    # the affected position. 
    4343 
    44     void PyList_SET_ITEM(object  list, Py_ssize_t i, object o) 
     44    void PyList_SET_ITEM(object list, Py_ssize_t i, object o) 
    4545    # Macro form of PyList_SetItem() without error checking. This is 
    4646    # normally only used to fill in new lists where there is no 
     
    5050    # position i will be *leaked*. 
    5151 
    52     int PyList_Insert(object  list, Py_ssize_t index, object item) 
     52    int PyList_Insert(object list, Py_ssize_t index, object item) 
    5353    # Insert the item item into list list in front of index 
    5454    # index. Return 0 if successful; return -1 and set an exception if 
    5555    # unsuccessful. Analogous to list.insert(index, item). 
    5656 
    57     int PyList_Append(object  list, object item) 
     57    int PyList_Append(object list, object item) 
    5858    # Append the object item at the end of list list. Return 0 if 
    5959    # successful; return -1 and set an exception if 
    6060    # unsuccessful. Analogous to list.append(item). 
    6161 
    62     object PyList_GetSlice(object  list, Py_ssize_t low, Py_ssize_t high) 
     62    object PyList_GetSlice(object list, Py_ssize_t low, Py_ssize_t high) 
    6363    # Return value: New reference. 
    6464    # Return a list of the objects in list containing the objects 
     
    6666    # unsuccessful. Analogous to list[low:high]. 
    6767 
    68     int PyList_SetSlice(object  list, Py_ssize_t low, Py_ssize_t high, object itemlist) 
     68    int PyList_SetSlice(object list, Py_ssize_t low, Py_ssize_t high, object itemlist) 
    6969    # Set the slice of list between low and high to the contents of 
    7070    # itemlist. Analogous to list[low:high] = itemlist. The itemlist 
     
    7272    # deletion). Return 0 on success, -1 on failure. 
    7373 
    74     int PyList_Sort(object  list) 
     74    int PyList_Sort(object list) 
    7575    # Sort the items of list in place. Return 0 on success, -1 on 
    7676    # failure. This is equivalent to "list.sort()". 
    7777 
    78     int PyList_Reverse(object  list) 
     78    int PyList_Reverse(object list) 
    7979    # Reverse the items of list in place. Return 0 on success, -1 on 
    8080    # failure. This is the equivalent of "list.reverse()". 
    8181 
    82     object PyList_AsTuple(object  list) 
     82    object PyList_AsTuple(object list) 
    8383    # Return value: New reference. 
    8484    # Return a new tuple object containing the contents of list; 
  • sage/ext/python_long.pxi

    r1765 r4841  
    1212    # type. This is the same object as long and types.LongType. 
    1313 
    14     int PyLong_Check(   object p) 
     14    int PyLong_Check(object p) 
    1515    # Return true if its argument is a PyLongObject or a subtype of PyLongObject.  
    1616 
    17     int PyLong_CheckExact(      object p) 
     17    int PyLong_CheckExact(object p) 
    1818    # Return true if its argument is a PyLongObject, but not a subtype of PyLongObject. 
    1919 
    20     object PyLong_FromLong(     long v) 
     20    object PyLong_FromLong(long v) 
    2121    # Return value: New reference. 
    2222    # Return a new PyLongObject object from v, or NULL on failure.  
    2323 
    24     object PyLong_FromUnsignedLong(     unsigned long v) 
     24    object PyLong_FromUnsignedLong(unsigned long v) 
    2525    # Return value: New reference. 
    2626    # Return a new PyLongObject object from a C unsigned long, or NULL on failure.  
    2727 
    28     object PyLong_FromLongLong( PY_LONG_LONG v) 
     28    object PyLong_FromLongLong(PY_LONG_LONG v) 
    2929    # Return value: New reference. 
    3030    # Return a new PyLongObject object from a C long long, or NULL on failure.  
    3131 
    3232    object PyLong_FromUnsignedLongLong(PY_LONG_LONG v) 
    33     #PyObject* PyLong_FromUnsignedLongLong(     unsigned PY_LONG_LONG v) 
     33    #PyObject* PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG v) 
    3434    # Return value: New reference. 
    3535    # Return a new PyLongObject object from a C unsigned long long, or NULL on failure.  
    3636 
    37     object PyLong_FromDouble(   double v) 
     37    object PyLong_FromDouble(double v) 
    3838    # Return value: New reference. 
    3939    # Return a new PyLongObject object from the integer part of v, or NULL on failure.  
    4040 
    41     object PyLong_FromString(   char *str, char **pend, int base) 
     41    object PyLong_FromString(char *str, char **pend, int base) 
    4242    # Return value: New reference. 
    4343    # Return a new PyLongObject based on the string value in str, 
     
    5353 
    5454     
    55     # object PyLong_FromUnicode(        Py_UNICODE *u, Py_ssize_t length, int base) 
     55    # object PyLong_FromUnicode(Py_UNICODE *u, Py_ssize_t length, int base) 
    5656    # Return value: New reference. 
    5757    # Convert a sequence of Unicode digits to a Python long integer 
     
    6262    # raised.  
    6363 
    64     object PyLong_FromVoidPtr(  void *p) 
     64    object PyLong_FromVoidPtr(void *p) 
    6565    # Return value: New reference. 
    6666    # Create a Python integer or long integer from the pointer p. The 
     
    6969    # positive long integer is returned. 
    7070 
    71     long PyLong_AsLong( object pylong) 
     71    long PyLong_AsLong(object pylong) 
    7272    # Return a C long representation of the contents of pylong. If 
    7373    # pylong is greater than LONG_MAX, an OverflowError is raised. 
    7474 
    75     unsigned long PyLong_AsUnsignedLong(        object pylong) 
     75    unsigned long PyLong_AsUnsignedLong(object pylong) 
    7676    # Return a C unsigned long representation of the contents of 
    7777    # pylong. If pylong is greater than ULONG_MAX, an OverflowError is 
    7878    # raised. 
    7979 
    80     PY_LONG_LONG PyLong_AsLongLong(     object pylong) 
     80    PY_LONG_LONG PyLong_AsLongLong(object pylong) 
    8181    # Return a C long long from a Python long integer. If pylong 
    8282    # cannot be represented as a long long, an OverflowError will be 
    8383    # raised. 
    8484 
    85     PY_LONG_LONG PyLong_AsUnsignedLongLong(     object pylong) 
    86     #unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(   object pylong) 
     85    PY_LONG_LONG PyLong_AsUnsignedLongLong(object pylong) 
     86    #unsigned PY_LONG_LONG PyLong_AsUnsignedLongLong(object pylong) 
    8787    # Return a C unsigned long long from a Python long integer. If 
    8888    # pylong cannot be represented as an unsigned long long, an 
     
    9090    # TypeError will be raised if the value is negative.  
    9191 
    92     unsigned long PyLong_AsUnsignedLongMask(    object io) 
     92    unsigned long PyLong_AsUnsignedLongMask(object io) 
    9393    # Return a C unsigned long from a Python long integer, without 
    9494    # checking for overflow.  
    9595 
    96     PY_LONG_LONG PyLong_AsUnsignedLongLongMask( object io) 
    97     #unsigned PY_LONG_LONG PyLong_AsUnsignedLongLongMask(       object io) 
     96    PY_LONG_LONG PyLong_AsUnsignedLongLongMask(object io) 
     97    #unsigned PY_LONG_LONG PyLong_AsUnsignedLongLongMask(object io) 
    9898    # Return a C unsigned long long from a Python long integer, 
    9999    # without checking for overflow. 
    100100 
    101101 
    102     double PyLong_AsDouble(     object pylong) 
     102    double PyLong_AsDouble(object pylong) 
    103103    # Return a C double representation of the contents of pylong. If 
    104104    # pylong cannot be approximately represented as a double, an 
    105105    # OverflowError exception is raised and -1.0 will be returned. 
    106106 
    107     void* PyLong_AsVoidPtr(     object pylong) 
     107    void* PyLong_AsVoidPtr(object pylong) 
    108108    # Convert a Python integer or long integer pylong to a C void 
    109109    # pointer. If pylong cannot be converted, an OverflowError will be 
  • sage/ext/python_mapping.pxi

    r1765 r4841  
    66    ############################################################################ 
    77 
    8     int PyMapping_Check(        object o) 
     8    int PyMapping_Check(object o) 
    99    # Return 1 if the object provides mapping protocol, and 0 
    1010    # otherwise. This function always succeeds. 
    1111 
    12     Py_ssize_t PyMapping_Length(        object o) 
     12    Py_ssize_t PyMapping_Length(object o) 
    1313    # Returns the number of keys in object o on success, and -1 on 
    1414    # failure. For objects that do not provide mapping protocol, this 
    1515    # is equivalent to the Python expression "len(o)". 
    1616 
    17     int PyMapping_DelItemString(        object o, char *key) 
     17    int PyMapping_DelItemString(object o, char *key) 
    1818    # Remove the mapping for object key from the object o. Return -1 
    1919    # on failure. This is equivalent to the Python statement "del 
    2020    # o[key]". 
    2121 
    22     int PyMapping_DelItem(      object o, object key) 
     22    int PyMapping_DelItem(object o, object key) 
    2323    # Remove the mapping for object key from the object o. Return -1 
    2424    # on failure. This is equivalent to the Python statement "del 
    2525    # o[key]". 
    2626 
    27     int PyMapping_HasKeyString( object o, char *key) 
     27    int PyMapping_HasKeyString(object o, char *key) 
    2828    # On success, return 1 if the mapping object has the key key and 0 
    2929    # otherwise. This is equivalent to the Python expression 
    3030    # "o.has_key(key)". This function always succeeds. 
    3131 
    32     int PyMapping_HasKey(       object o, object key) 
     32    int PyMapping_HasKey(object o, object key) 
    3333    # Return 1 if the mapping object has the key key and 0 
    3434    # otherwise. This is equivalent to the Python expression 
    3535    # "o.has_key(key)". This function always succeeds. 
    3636 
    37     object PyMapping_Keys(      object o) 
     37    object PyMapping_Keys(object o) 
    3838    # Return value: New reference. 
    3939    # On success, return a list of the keys in object o. On failure, 
     
    4141    # "o.keys()". 
    4242 
    43     object PyMapping_Values(    object o) 
     43    object PyMapping_Values(object o) 
    4444    # Return value: New reference. 
    4545    # On success, return a list of the values in object o. On failure, 
     
    4747    # "o.values()". 
    4848 
    49     object PyMapping_Items(     object o) 
     49    object PyMapping_Items(object o) 
    5050    # Return value: New reference. 
    5151    # On success, return a list of the items in object o, where each 
     
    5353    # NULL. This is equivalent to the Python expression "o.items()". 
    5454 
    55     object PyMapping_GetItemString(     object o, char *key) 
     55    object PyMapping_GetItemString(object o, char *key) 
    5656    # Return value: New reference. 
    5757    # Return element of o corresponding to the object key or NULL on 
     
    5959    # "o[key]". 
    6060 
    61     int PyMapping_SetItemString(        object o, char *key, object v) 
     61    int PyMapping_SetItemString(object o, char *key, object v) 
    6262    # Map the object key to the value v in object o. Returns -1 on 
    6363    # failure. This is the equivalent of the Python statement "o[key] 
  • sage/ext/python_mem.pxi

    r1765 r4841  
    2929    # heap: 
    3030 
    31     void* PyMem_Malloc( size_t n) 
     31    void* PyMem_Malloc(size_t n) 
    3232    # Allocates n bytes and returns a pointer of type void* to the 
    3333    # allocated memory, or NULL if the request fails. Requesting zero 
     
    3636    # have been initialized in any way. 
    3737 
    38     void* PyMem_Realloc(        void *p, size_t n) 
     38    void* PyMem_Realloc(void *p, size_t n) 
    3939    # Resizes the memory block pointed to by p to n bytes. The 
    4040    # contents will be unchanged to the minimum of the old and the new 
     
    4545    # PyMem_Malloc() or PyMem_Realloc(). 
    4646 
    47     void PyMem_Free(    void *p) 
     47    void PyMem_Free(void *p) 
    4848    # Frees the memory block pointed to by p, which must have been 
    4949    # returned by a previous call to PyMem_Malloc() or 
     
    5555    # convenience. Note that TYPE refers to any C type. 
    5656 
    57     # TYPE* PyMem_New(  TYPE, size_t n) 
     57    # TYPE* PyMem_New(TYPE, size_t n) 
    5858    # Same as PyMem_Malloc(), but allocates (n * sizeof(TYPE)) bytes 
    5959    # of memory. Returns a pointer cast to TYPE*. The memory will not 
    6060    # have been initialized in any way. 
    6161 
    62     # TYPE* PyMem_Resize(       void *p, TYPE, size_t n) 
     62    # TYPE* PyMem_Resize(void *p, TYPE, size_t n) 
    6363    # Same as PyMem_Realloc(), but the memory block is resized to (n * 
    6464    # sizeof(TYPE)) bytes. Returns a pointer cast to TYPE*. 
    6565 
    66     void PyMem_Del(     void *p) 
     66    void PyMem_Del(void *p) 
    6767    # Same as PyMem_Free().  
    6868 
  • sage/ext/python_method.pxi

    r1765 r4841  
    99    # This instance of PyTypeObject represents the Python method type. This is exposed to Python programs as types.MethodType.  
    1010 
    11     int PyMethod_Check( object o) 
     11    int PyMethod_Check(object o) 
    1212    # Return true if o is a method object (has type 
    1313    # PyMethod_Type). The parameter must not be NULL. 
    1414 
    15     object PyMethod_New(        object func, object self, object cls) 
     15    object PyMethod_New(object func, object self, object cls) 
    1616    # Return value: New reference. 
    1717    # Return a new method object, with func being any callable object; 
     
    2222    # which provides the unbound method.. 
    2323 
    24     PyObject* PyMethod_Class(   object meth) 
     24    PyObject* PyMethod_Class(object meth) 
    2525    # Return value: Borrowed reference. 
    2626    # Return the class object from which the method meth was created; 
     
    2828    # the instance. 
    2929 
    30     PyObject* PyMethod_GET_CLASS(       object meth) 
     30    PyObject* PyMethod_GET_CLASS(object meth) 
    3131    # Return value: Borrowed reference. 
    3232    # Macro version of PyMethod_Class() which avoids error checking.  
    3333 
    34     PyObject* PyMethod_Function(        object meth) 
     34    PyObject* PyMethod_Function(object meth) 
    3535    # Return value: Borrowed reference. 
    3636    # Return the function object associated with the method meth.  
    3737 
    38     PyObject* PyMethod_GET_FUNCTION(    object meth) 
     38    PyObject* PyMethod_GET_FUNCTION(object meth) 
    3939    # Return value: Borrowed reference. 
    4040    # Macro version of PyMethod_Function() which avoids error checking.  
    4141 
    42     PyObject* PyMethod_Self(    object meth) 
     42    PyObject* PyMethod_Self(object meth) 
    4343    # Return value: Borrowed reference. 
    4444    # Return the instance associated with the method meth if it is bound, otherwise return NULL.  
    4545 
    46     PyObject* PyMethod_GET_SELF(        object meth) 
     46    PyObject* PyMethod_GET_SELF(object meth) 
    4747    # Return value: Borrowed reference. 
    4848    # Macro version of PyMethod_Self() which avoids error checking.  
  • sage/ext/python_module.pxi

    r1765 r4841  
    66    # 5.3 Importing Modules 
    77    ##################################################################### 
    8     object PyImport_ImportModule(       char *name) 
     8    object PyImport_ImportModule(char *name) 
    99    # Return value: New reference. 
    1010    # This is a simplified interface to PyImport_ImportModuleEx() 
     
    2020    # with an exception set on failure. 
    2121 
    22     object PyImport_ImportModuleEx(     char *name, object globals, object locals, object fromlist) 
     22    object PyImport_ImportModuleEx(char *name, object globals, object locals, object fromlist) 
    2323    # Return value: New reference. 
    2424 
     
    3535    # failing imports remove incomplete module objects. 
    3636 
    37     object PyImport_Import(     object name) 
     37    object PyImport_Import(object name) 
    3838    # Return value: New reference. 
    3939    # This is a higher-level interface that calls the current ``import 
     
    4343    # environment, e.g. by rexec or ihooks. 
    4444 
    45     object PyImport_ReloadModule(       object m) 
     45    object PyImport_ReloadModule(object m) 
    4646    # Return value: New reference. 
    4747    # Reload a module. This is best described by referring to the 
     
    5151    # (the module still exists in this case). 
    5252 
    53     PyObject* PyImport_AddModule(       char *name) 
     53    PyObject* PyImport_AddModule(char *name) 
    5454    # Return value: Borrowed reference. 
    5555    # Return the module object corresponding to a module name. The 
     
    6464    # present. 
    6565 
    66     object PyImport_ExecCodeModule(     char *name, object co) 
     66    object PyImport_ExecCodeModule(char *name, object co) 
    6767    # Return value: New reference. 
    6868    # Given a module name (possibly of the form package.module) and a 
     
    8585 
    8686 
    87     long PyImport_GetMagicNumber(       ) 
     87    long PyImport_GetMagicNumber() 
    8888    # Return the magic number for Python bytecode files (a.k.a. .pyc 
    8989    # and .pyo files). The magic number should be present in the first 
    9090    # four bytes of the bytecode file, in little-endian byte order. 
    9191 
    92     PyObject* PyImport_GetModuleDict(   ) 
     92    PyObject* PyImport_GetModuleDict() 
    9393    # Return value: Borrowed reference. 
    9494    # Return the dictionary used for the module administration 
     
    9797 
    9898 
    99     int PyImport_ImportFrozenModule(    char *name) 
     99    int PyImport_ImportFrozenModule(char *name) 
    100100    # Load a frozen module named name. Return 1 for success, 0 if the 
    101101    # module is not found, and -1 with an exception set if the 
     
    123123    # type. This is exposed to Python programs as types.ModuleType. 
    124124 
    125     int PyModule_Check( object p) 
     125    int PyModule_Check(object p) 
    126126    # Return true if p is a module object, or a subtype of a module 
    127127    # object. 
    128128 
    129     int PyModule_CheckExact(    object p) 
     129    int PyModule_CheckExact(object p) 
    130130    # Return true if p is a module object, but not a subtype of PyModule_Type.  
    131131 
    132     object PyModule_New(        char *name) 
     132    object PyModule_New( char *name) 
    133133    # Return value: New reference. 
    134134    # Return a new module object with the __name__ attribute set to 
     
    137137    # attribute. 
    138138 
    139     PyObject* PyModule_GetDict( object module) 
     139    PyObject* PyModule_GetDict(object module) 
    140140    # Return value: Borrowed reference. 
    141141    # Return the dictionary object that implements module's namespace; 
     
    145145    # directly manipulate a module's __dict__. 
    146146 
    147     char* PyModule_GetName(     object module) 
     147    char* PyModule_GetName(object module) 
    148148    # Return module's __name__ value. If the module does not provide 
    149149    # one, or if it is not a string, SystemError is raised and NULL is 
    150150    # returned. 
    151151 
    152     char* PyModule_GetFilename( object module) 
     152    char* PyModule_GetFilename(object module) 
    153153    # Return the name of the file from which module was loaded using 
    154154    # module's __file__ attribute. If this is not defined, or if it is 
    155155    # not a string, raise SystemError and return NULL. 
    156156 
    157     int PyModule_AddObject(     object module,  char *name, object value) 
     157    int PyModule_AddObject(object module,  char *name, object value) 
    158158    # Add an object to module as name. This is a convenience function 
    159159    # which can be used from the module's initialization 
     
    161161    # 0 on success.  
    162162 
    163     int PyModule_AddIntant(     object module,  char *name, long value) 
     163    int PyModule_AddIntant(object module,  char *name, long value) 
    164164    # Add an integer ant to module as name. This convenience 
    165165    # function can be used from the module's initialization 
    166166    # function. Return -1 on error, 0 on success.  
    167167 
    168     int PyModule_AddStringant(  object module,  char *name,  char *value) 
     168    int PyModule_AddStringant(object module,  char *name,  char *value) 
    169169    # Add a string constant to module as name. This convenience 
    170170    # function can be used from the module's initialization 
  • sage/ext/python_number.pxi

    r1766 r4841  
    99    ##################################################################### 
    1010 
    11     int PyNumber_Check( object o) 
     11    int PyNumber_Check(object o) 
    1212    # Returns 1 if the object o provides numeric protocols, and false 
    1313    # otherwise. This function always succeeds. 
    1414 
    15     object PyNumber_Add(        object o1, object o2) 
     15    object PyNumber_Add(object o1, object o2) 
    1616    # Return value: New reference. 
    1717    # Returns the result of adding o1 and o2, or NULL on failure. This 
    1818    # is the equivalent of the Python expression "o1 + o2". 
    1919 
    20     object PyNumber_Subtract(   object o1, object o2) 
     20    object PyNumber_Subtract(object o1, object o2) 
    2121    # Return value: New reference. 
    2222    # Returns the result of subtracting o2 from o1, or NULL on 
     
    2424    # o2". 
    2525 
    26     object PyNumber_Multiply(   object o1, object o2) 
     26    object PyNumber_Multiply(object o1, object o2) 
    2727    # Return value: New reference. 
    2828    # Returns the result of multiplying o1 and o2, or NULL on 
     
    3030    # o2". 
    3131 
    32     object PyNumber_Divide(     object o1, object o2) 
     32    object PyNumber_Divide(object o1, object o2) 
    3333    # Return value: New reference. 
    3434    # Returns the result of dividing o1 by o2, or NULL on 
     
    3636    # o2". 
    3737 
    38     object PyNumber_FloorDivide(        object o1, object o2) 
     38    object PyNumber_FloorDivide(object o1, object o2) 
    3939    # Return value: New reference. 
    4040    # Return the floor of o1 divided by o2, or NULL on failure. This 
    4141    # is equivalent to the ``classic'' division of integers.  
    4242 
    43     object PyNumber_TrueDivide( object o1, object o2) 
     43    object PyNumber_TrueDivide(object o1, object o2) 
    4444    # Return value: New reference. 
    4545    # Return a reasonable approximation for the mathematical value of 
     
    5050    # passed two integers.  
    5151 
    52     object PyNumber_Remainder(  object o1, object o2) 
     52    object PyNumber_Remainder(object o1, object o2) 
    5353    # Return value: New reference. 
    5454    # Returns the remainder of dividing o1 by o2, or NULL on 
     
    5656    # o2". 
    5757 
    58     object PyNumber_Divmod(     object o1, object o2) 
     58    object PyNumber_Divmod(object o1, object o2) 
    5959    # Return value: New reference. 
    6060    # See the built-in function divmod(). Returns NULL on 
     
    6262    # "divmod(o1, o2)". 
    6363 
    64     object PyNumber_Power(      object o1, object o2, object o3) 
     64    object PyNumber_Power(object o1, object o2, object o3) 
    6565    # Return value: New reference. 
    6666    # See the built-in function pow(). Returns NULL on failure. This 
     
    7070    # access). 
    7171 
    72     object PyNumber_Negative(   object o) 
     72    object PyNumber_Negative(object o) 
    7373    # Return value: New reference. 
    7474    # Returns the negation of o on success, or NULL on failure. This 
    7575    # is the equivalent of the Python expression "-o". 
    7676 
    77     object PyNumber_Positive(   object o) 
     77    object PyNumber_Positive(object o) 
    7878    # Return value: New reference. 
    7979    # Returns o on success, or NULL on failure. This is the equivalent 
    8080    # of the Python expression "+o". 
    8181 
    82     object PyNumber_Absolute(   object o) 
     82    object PyNumber_Absolute(object o) 
    8383    # Return value: New reference. 
    8484    # Returns the absolute value of o, or NULL on failure. This is the 
    8585    # equivalent of the Python expression "abs(o)". 
    8686 
    87     object PyNumber_Invert(     object o) 
     87    object PyNumber_Invert(object o) 
    8888    # Return value: New reference. 
    8989    # Returns the bitwise negation of o on success, or NULL on 
    9090    # failure. This is the equivalent of the Python expression "~o". 
    9191 
    92     object PyNumber_Lshift(     object o1, object o2) 
     92    object PyNumber_Lshift(object o1, object o2) 
    9393    # Return value: New reference. 
    9494    # Returns the result of left shifting o1 by o2 on success, or NULL 
     
    9696    # << o2". 
    9797 
    98     object PyNumber_Rshift(     object o1, object o2) 
     98    object PyNumber_Rshift(object o1, object o2) 
    9999    # Return value: New reference. 
    100100    # Returns the result of right shifting o1 by o2 on success, or 
     
    102102    # "o1 >> o2". 
    103103 
    104     object PyNumber_And(        object o1, object o2) 
     104    object PyNumber_And(object o1, object o2) 
    105105    # Return value: New reference. 
    106106    # Returns the ``bitwise and'' of o1 and o2 on success and NULL on 
     
    108108    # o2". 
    109109 
    110     object PyNumber_Xor(        object o1, object o2) 
     110    object PyNumber_Xor(object o1, object o2) 
    111111    # Return value: New reference. 
    112112    # Returns the ``bitwise exclusive or'' of o1 by o2 on success, or 
     
    114114    # "o1 ^ o2". 
    115115 
    116     object PyNumber_Or( object o1, object o2) 
     116    object PyNumber_Or(object o1, object o2) 
    117117    # Return value: New reference. 
    118118    # Returns the ``bitwise or'' of o1 and o2 on success, or NULL on failure. This is the equivalent of the Python expression "o1 | o2".  
    119119 
    120     object PyNumber_InPlaceAdd( object o1, object o2) 
     120    object PyNumber_InPlaceAdd(object o1, object o2) 
    121121    # Return value: New reference. 
    122122    # Returns the result of adding o1 and o2, or NULL on failure. The 
     
    124124    # equivalent of the Python statement "o1 += o2". 
    125125 
    126     object PyNumber_InPlaceSubtract(    object o1, object o2) 
     126    object PyNumber_InPlaceSubtract(object o1, object o2) 
    127127    # Return value: New reference. 
    128128    # Returns the result of subtracting o2 from o1, or NULL on 
     
    130130    # it. This is the equivalent of the Python statement "o1 -= o2". 
    131131 
    132     object PyNumber_InPlaceMultiply(    object o1, object o2) 
     132    object PyNumber_InPlaceMultiply(object o1, object o2) 
    133133    # Return value: New reference. 
    134134    # Returns the result of multiplying o1 and o2, or NULL on 
     
    136136    # it. This is the equivalent of the Python statement "o1 *= o2". 
    137137 
    138     object PyNumber_InPlaceDivide(      object o1, object o2) 
     138    object PyNumber_InPlaceDivide(object o1, object o2) 
    139139    # Return value: New reference. 
    140140    # Returns the result of dividing o1 by o2, or NULL on failure. The 
     
    142142    # equivalent of the Python statement "o1 /= o2". 
    143143 
    144     object PyNumber_InPlaceFloorDivide( object o1, object o2) 
     144    object PyNumber_InPlaceFloorDivide(object o1, object o2) 
    145145    # Return value: New reference. 
    146146    # Returns the mathematical floor of dividing o1 by o2, or NULL on 
     
    149149    # o2".  
    150150 
    151     object PyNumber_InPlaceTrueDivide(  object o1, object o2) 
     151    object PyNumber_InPlaceTrueDivide(object o1, object o2) 
    152152    # Return value: New reference. 
    153153    # Return a reasonable approximation for the mathematical value of 
     
    159159    # supports it.  
    160160 
    161     object PyNumber_InPlaceRemainder(   object o1, object o2) 
     161    object PyNumber_InPlaceRemainder(object o1, object o2) 
    162162    # Return value: New reference. 
    163163    # Returns the remainder of dividing o1 by o2, or NULL on 
     
    165165    # it. This is the equivalent of the Python statement "o1 %= o2". 
    166166 
    167     object PyNumber_InPlacePower(       object o1, object o2, object o3) 
     167    object PyNumber_InPlacePower(object o1, object o2, object o3) 
    168168    # Return value: New reference. 
    169169    # See the built-in function pow(). Returns NULL on failure. The 
     
    174174    # (passing NULL for o3 would cause an illegal memory access). 
    175175 
    176     object PyNumber_InPlaceLshift(      object o1, object o2) 
     176    object PyNumber_InPlaceLshift(object o1, object o2) 
    177177    # Return value: New reference. 
    178178    # Returns the result of left shifting o1 by o2 on success, or NULL 
     
    180180    # it. This is the equivalent of the Python statement "o1 <<= o2". 
    181181 
    182     object PyNumber_InPlaceRshift(      object o1, object o2) 
     182    object PyNumber_InPlaceRshift(object o1, object o2) 
    183183    # Return value: New reference. 
    184184    # Returns the result of right shifting o1 by o2 on success, or 
     
    186186    # it. This is the equivalent of the Python statement "o1 >>= o2". 
    187187 
    188     object PyNumber_InPlaceAnd( object o1, object o2) 
     188    object PyNumber_InPlaceAnd(object o1, object o2) 
    189189    # Return value: New reference. 
    190190    # Returns the ``bitwise and'' of o1 and o2 on success and NULL on 
     
    192192    # it. This is the equivalent of the Python statement "o1 &= o2". 
    193193 
    194     object PyNumber_InPlaceXor( object o1, object o2) 
     194    object PyNumber_InPlaceXor(object o1, object o2) 
    195195    # Return value: New reference. 
    196196    # Returns the ``bitwise exclusive or'' of o1 by o2 on success, or 
     
    198198    # it. This is the equivalent of the Python statement "o1 ^= o2". 
    199199 
    200     object PyNumber_InPlaceOr(  object o1, object o2) 
     200    object PyNumber_InPlaceOr(object o1, object o2) 
    201201    # Return value: New reference. 
    202202    # Returns the ``bitwise or'' of o1 and o2 on success, or NULL on 
     
    216216    # o2)". 
    217217 
    218     object PyNumber_Int(        object o) 
     218    object PyNumber_Int(object o) 
    219219    # Return value: New reference. 
    220220    # Returns the o converted to an integer object on success, or NULL 
     
    223223    # Python expression "int(o)". 
    224224 
    225     object PyNumber_Long(       object o) 
     225    object PyNumber_Long(object o) 
    226226    # Return value: New reference. 
    227227    # Returns the o converted to a long integer object on success, or 
     
    229229    # "long(o)". 
    230230 
    231     object PyNumber_Float(      object o) 
     231    object PyNumber_Float(object o) 
    232232    # Return value: New reference. 
    233233    # Returns the o converted to a float object on success, or NULL on 
     
    235235    # "float(o)". 
    236236 
    237     object PyNumber_Index(      object o) 
     237    object PyNumber_Index(object o) 
    238238    # Returns the o converted to a Python int or long on success or 
    239239    # NULL with a TypeError exception raised on failure. 
    240240 
    241     Py_ssize_t PyNumber_AsSsize_t(      object o, object exc) 
     241    Py_ssize_t PyNumber_AsSsize_t(object o, object exc) 
    242242    # Returns o converted to a Py_ssize_t value if o can be 
    243243    # interpreted as an integer. If o can be converted to a Python int 
     
    249249    # integer or PY_SSIZE_T_MAX for a positive integer.  
    250250 
    251     int PyIndex_Check(  object o) 
     251    int PyIndex_Check(object o) 
    252252    # Returns True if o is an index integer (has the nb_index slot of the tp_as_number structure filled in).      
  • sage/ext/python_object.pxi

    r1818 r4841  
    77    # 6.1 Object Protocol 
    88    ##################################################################### 
    9     int PyObject_Print( object o, FILE *fp, int flags) 
     9    int PyObject_Print(object o, FILE *fp, int flags) 
    1010    # Print an object o, on file fp. Returns -1 on error. The flags 
    1111    # argument is used to enable certain printing options. The only 
     
    1313    # of the object is written instead of the repr(). 
    1414 
    15     int PyObject_HasAttrString( object o, char *attr_name) 
     15    int PyObject_HasAttrString(object o, char *attr_name) 
    1616    # Returns 1 if o has the attribute attr_name, and 0 
    1717    # otherwise. This is equivalent to the Python expression 
    1818    # "hasattr(o, attr_name)". This function always succeeds. 
    1919 
    20     object PyObject_GetAttrString(      object o, char *attr_name) 
     20    object PyObject_GetAttrString(object o, char *attr_name) 
    2121    # Return value: New reference.  Retrieve an attribute named 
    2222    # attr_name from object o. Returns the attribute value on success, 
     
    2424    # expression "o.attr_name". 
    2525 
    26     int PyObject_HasAttr(       object o, object attr_name) 
     26    int PyObject_HasAttr(object o, object attr_name) 
    2727    # Returns 1 if o has the attribute attr_name, and 0 
    2828    # otherwise. This is equivalent to the Python expression 
    2929    # "hasattr(o, attr_name)". This function always succeeds. 
    3030 
    31     object PyObject_GetAttr(    object o, object attr_name) 
     31    object PyObject_GetAttr(object o, object attr_name) 
    3232    # Return value: New reference.  Retrieve an attribute named 
    3333    # attr_name from object o. Returns the attribute value on success, 
     
    3535    # expression "o.attr_name". 
    3636 
    37     int PyObject_SetAttrString( object o, char *attr_name, object v) 
     37    int PyObject_SetAttrString(object o, char *attr_name, object v) 
    3838    # Set the value of the attribute named attr_name, for object o, to 
    3939    # the value v. Returns -1 on failure. This is the equivalent of 
    4040    # the Python statement "o.attr_name = v". 
    4141 
    42     int PyObject_SetAttr(       object o, object attr_name, object v) 
     42    int PyObject_SetAttr(object o, object attr_name, object v) 
    4343    # Set the value of the attribute named attr_name, for object o, to 
    4444    # the value v. Returns -1 on failure. This is the equivalent of 
    4545    # the Python statement "o.attr_name = v". 
    4646 
    47     int PyObject_DelAttrString( object o, char *attr_name) 
     47    int PyObject_DelAttrString(object o, char *attr_name) 
    4848    # Delete attribute named attr_name, for object o. Returns -1 on 
    4949    # failure. This is the equivalent of the Python statement: "del 
    5050    # o.attr_name". 
    5151 
    52     int PyObject_DelAttr(       object o, object attr_name) 
     52    int PyObject_DelAttr(object o, object attr_name) 
    5353    # Delete attribute named attr_name, for object o. Returns -1 on 
    5454    # failure. This is the equivalent of the Python statement "del 
    5555    # o.attr_name". 
    5656 
    57     object PyObject_RichCompare(        object o1, object o2, int opid) 
     57    object PyObject_RichCompare(object o1, object o2, int opid) 
    5858    # Return value: New reference. 
    5959    # Compare the values of o1 and o2 using the operation specified by 
     
    6565    # failure. 
    6666 
    67     int PyObject_RichCompareBool(       object o1, object o2, int opid) 
     67    int PyObject_RichCompareBool(object o1, object o2, int opid) 
    6868    # Compare the values of o1 and o2 using the operation specified by 
    6969    # opid, which must be one of Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, or 
     
    7373    # op o2", where op is the operator corresponding to opid. 
    7474 
    75     int PyObject_Cmp(   object o1, object o2, int *result) 
     75    int PyObject_Cmp(object o1, object o2, int *result) 
    7676    # Compare the values of o1 and o2 using a routine provided by o1, 
    7777    # if one exists, otherwise with a routine provided by o2. The 
     
    8080    # = cmp(o1, o2)". 
    8181 
    82     int PyObject_Compare(       object o1, object o2) 
     82    int PyObject_Compare(object o1, object o2) 
    8383    # Compare the values of o1 and o2 using a routine provided by o1, 
    8484    # if one exists, otherwise with a routine provided by o2. Returns 
     
    8888    # o2)". 
    8989 
    90     object PyObject_Repr(       object o) 
     90    object PyObject_Repr(object o) 
    9191    # Return value: New reference. 
    9292    # Compute a string representation of object o. Returns the string 
     
    9595    # repr() built-in function and by reverse quotes. 
    9696 
    97     object PyObject_Str(        object o) 
     97    object PyObject_Str(object o) 
    9898    # Return value: New reference. 
    9999    # Compute a string representation of object o. Returns the string 
     
    102102    # str() built-in function and by the print statement. 
    103103 
    104     object PyObject_Unicode(    object o) 
     104    object PyObject_Unicode(object o) 
    105105    # Return value: New reference. 
    106106    # Compute a Unicode string representation of object o. Returns the 
     
    109109    # by the unicode() built-in function. 
    110110 
    111     int PyObject_IsInstance(    object inst, object cls) 
     111    int PyObject_IsInstance(object inst, object cls) 
    112112    # Returns 1 if inst is an instance of the class cls or a subclass 
    113113    # of cls, or 0 if not. On error, returns -1 and sets an 
     
    134134    # considered sufficient for this determination. 
    135135 
    136     int PyObject_IsSubclass(    object derived, object cls) 
     136    int PyObject_IsSubclass(object derived, object cls) 
    137137    # Returns 1 if the class derived is identical to or derived from 
    138138    # the class cls, otherwise returns 0. In case of an error, returns 
     
    145145    # support a tuple as the second argument. 
    146146 
    147     int PyCallable_Check(       object o) 
     147    int PyCallable_Check(object o) 
    148148    # Determine if the object o is callable. Return 1 if the object is 
    149149    # callable and 0 otherwise. This function always succeeds. 
    150150 
    151     object PyObject_Call(       object callable_object, object args, object kw) 
     151    object PyObject_Call(object callable_object, object args, object kw) 
    152152    # Return value: New reference. 
    153153    # Call a callable Python object callable_object, with arguments 
     
    160160    # **kw)". 
    161161 
    162     object PyObject_CallObject( object callable_object, object args) 
     162    object PyObject_CallObject(object callable_object, object args) 
    163163    # Return value: New reference. 
    164164    # Call a callable Python object callable_object, with arguments 
     
    168168    # "apply(callable_object, args)" or "callable_object(*args)". 
    169169 
    170     object PyObject_CallFunction(       object callable, char *format, ...) 
     170    object PyObject_CallFunction(object callable, char *format, ...) 
    171171    # Return value: New reference. 
    172172    # Call a callable Python object callable, with a variable number 
     
    179179    # PyObject_CallFunctionObjArgs is a faster alternative. 
    180180 
    181     object PyObject_CallMethod( object o, char *method, char *format, ...) 
     181    object PyObject_CallMethod(object o, char *method, char *format, ...) 
    182182    # Return value: New reference. 
    183183    # Call the method named method of object o with a variable number 
     
    190190    # PyObject_CallMethodObjArgs is a faster alternative. 
    191191 
    192     #object PyObject_CallFunctionObjArgs(       object callable, ..., NULL) 
    193     object PyObject_CallFunctionObjArgs(        object callable, ...) 
     192    #object PyObject_CallFunctionObjArgs(object callable, ..., NULL) 
     193    object PyObject_CallFunctionObjArgs(object callable, ...) 
    194194    # Return value: New reference. 
    195195    # Call a callable Python object callable, with a variable number 
     
    198198    # call on success, or NULL on failure.  
    199199 
    200     #PyObject* PyObject_CallMethodObjArgs(      object o, object name, ..., NULL) 
    201     object PyObject_CallMethodObjArgs(  object o, object name, ...) 
     200    #PyObject* PyObject_CallMethodObjArgs(object o, object name, ..., NULL) 
     201    object PyObject_CallMethodObjArgs(object o, object name, ...) 
    202202    # Return value: New reference. 
    203203    # Calls a method of the object o, where the name of the method is 
     
    208208    # failure. 
    209209 
    210     long PyObject_Hash( object o) 
     210    long PyObject_Hash(object o) 
    211211    # Compute and return the hash value of an object o. On failure, 
    212212    # return -1. This is the equivalent of the Python expression 
    213213    # "hash(o)". 
    214214 
    215     int PyObject_IsTrue(        object o) 
     215    int PyObject_IsTrue(object o) 
    216216    # Returns 1 if the object o is considered to be true, and 0 
    217217    # otherwise. This is equivalent to the Python expression "not not 
    218218    # o". On failure, return -1. 
    219219 
    220     int PyObject_Not(   object o) 
     220    int PyObject_Not(object o) 
    221221    # Returns 0 if the object o is considered to be true, and 1 
    222222    # otherwise. This is equivalent to the Python expression "not 
    223223    # o". On failure, return -1. 
    224224 
    225     object PyObject_Type(       object o) 
     225    object PyObject_Type(object o) 
    226226    # Return value: New reference. 
    227227    # When o is non-NULL, returns a type object corresponding to the 
     
    238238    # type. Both parameters must be non-NULL. 
    239239 
    240     Py_ssize_t PyObject_Length( object o) 
    241     Py_ssize_t PyObject_Size(   object o) 
     240    Py_ssize_t PyObject_Length(object o) 
     241    Py_ssize_t PyObject_Size(object o) 
    242242    # Return the length of object o. If the object o provides either 
    243243    # the sequence and mapping protocols, the sequence length is 
     
    245245    # the Python expression "len(o)". 
    246246 
    247     object PyObject_GetItem(    object o, object key) 
     247    object PyObject_GetItem(object o, object key) 
    248248    # Return value: New reference. 
    249249    # Return element of o corresponding to the object key or NULL on 
     
    251251    # "o[key]". 
    252252 
    253     int PyObject_SetItem(       object o, object key, object v) 
     253    int PyObject_SetItem(object o, object key, object v) 
    254254    # Map the object key to the value v. Returns -1 on failure. This 
    255255    # is the equivalent of the Python statement "o[key] = v". 
    256256 
    257     int PyObject_DelItem(       object o, object key) 
     257    int PyObject_DelItem(object o, object key) 
    258258    # Delete the mapping for key from o. Returns -1 on failure. This 
    259259    # is the equivalent of the Python statement "del o[key]". 
    260260 
    261     int PyObject_AsFileDescriptor(      object o) 
     261    int PyObject_AsFileDescriptor(object o) 
    262262    # Derives a file-descriptor from a Python object. If the object is 
    263263    # an integer or long integer, its value is returned. If not, the 
     
    266266    # descriptor value. Returns -1 on failure. 
    267267 
    268     object PyObject_Dir(        object o) 
     268    object PyObject_Dir(object o) 
    269269    # Return value: New reference. 
    270270    # This is equivalent to the Python expression "dir(o)", returning 
     
    276276    # false. 
    277277 
    278     object PyObject_GetIter(    object o) 
     278    object PyObject_GetIter(object o) 
    279279    # Return value: New reference. 
    280280    # This is equivalent to the Python expression "iter(o)". It 
  • sage/ext/python_parse.pxi

    r1765 r4841  
    55    ##################################################################### 
    66    ctypedef struct va_list 
    7     int PyArg_ParseTuple(       PyObject *args, char *format, ...) 
    8     int PyArg_VaParse(  PyObject *args, char *format, va_list vargs) 
    9     int PyArg_ParseTupleAndKeywords(    PyObject *args, PyObject *kw, char *format, char *keywords[], ...) 
    10     int PyArg_VaParseTupleAndKeywords(  PyObject *args, PyObject *kw, char *format, char *keywords[], va_list vargs) 
    11     int PyArg_Parse(    PyObject *args, char *format, ...) 
    12     int PyArg_UnpackTuple(      PyObject *args, char *name, Py_ssize_t min, Py_ssize_t max, ...) 
     7    int PyArg_ParseTuple(PyObject *args, char *format, ...) 
     8    int PyArg_VaParse(PyObject *args, char *format, va_list vargs) 
     9    int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, char *format, char *keywords[], ...) 
     10    int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, char *format, char *keywords[], va_list vargs) 
     11    int PyArg_Parse(PyObject *args, char *format, ...) 
     12    int PyArg_UnpackTuple(PyObject *args, char *name, Py_ssize_t min, Py_ssize_t max, ...) 
    1313 
  • sage/ext/python_ref.pxi

    r1765 r4841  
    99    ##################################################################### 
    1010    # The macros in this section are used for managing reference counts of Python objects. 
    11     void Py_INCREF(     object o) 
     11    void Py_INCREF(object o) 
    1212    # Increment the reference count for object o. The object must not 
    1313    # be NULL; if you aren't sure that it isn't NULL, use 
    1414    # Py_XINCREF(). 
    1515 
    16     void Py_XINCREF(    object o) 
     16    void Py_XINCREF(object o) 
    1717    # Increment the reference count for object o. The object may be NULL, in which case the macro has no effect.  
    1818 
    19     void Py_DECREF(     object o) 
     19    void Py_DECREF(object o) 
    2020    # Decrement the reference count for object o. The object must not 
    2121    # be NULL; if you aren't sure that it isn't NULL, use 
     
    3535    # call Py_DECREF() for the temporary variable. 
    3636 
    37     void Py_XDECREF(    object o) 
     37    void Py_XDECREF(object o) 
    3838    # Decrement the reference count for object o. The object may be 
    3939    # NULL, in which case the macro has no effect; otherwise the 
     
    4141    # applies. 
    4242 
    43     void Py_CLEAR(      object o) 
     43    void Py_CLEAR(object o) 
    4444    # Decrement the reference count for object o. The object may be 
    4545    # NULL, in which case the macro has no effect; otherwise the 
  • sage/ext/python_sequence.pxi

    r1765 r4841  
    77 
    88 
    9     int PySequence_Check(       object o) 
     9    int PySequence_Check(object o) 
    1010    # Return 1 if the object provides sequence protocol, and 0 
    1111    # otherwise. This function always succeeds. 
    1212 
    13     Py_ssize_t PySequence_Size( object o) 
     13    Py_ssize_t PySequence_Size(object o) 
    1414    # Returns the number of objects in sequence o on success, and -1 
    1515    # on failure. For objects that do not provide sequence protocol, 
    1616    # this is equivalent to the Python expression "len(o)". 
    1717 
    18     Py_ssize_t PySequence_Length(       object o) 
     18    Py_ssize_t PySequence_Length(object o) 
    1919    # Alternate name for PySequence_Size().  
    2020 
    21     object PySequence_Concat(   object o1, object o2) 
     21    object PySequence_Concat(object o1, object o2) 
    2222    # Return value: New reference. 
    2323    # Return the concatenation of o1 and o2 on success, and NULL on 
     
    2525    # o2". 
    2626 
    27     object PySequence_Repeat(   object o, Py_ssize_t count) 
     27    object PySequence_Repeat(object o, Py_ssize_t count) 
    2828    # Return value: New reference. 
    2929    # Return the result of repeating sequence object o count times, or 
     
    3131    # "o * count". 
    3232 
    33     object PySequence_InPlaceConcat(    object o1, object o2) 
     33    object PySequence_InPlaceConcat(object o1, object o2) 
    3434    # Return value: New reference. 
    3535    # Return the concatenation of o1 and o2 on success, and NULL on 
     
    3737    # it. This is the equivalent of the Python expression "o1 += o2". 
    3838 
    39     object PySequence_InPlaceRepeat(    object o, Py_ssize_t count) 
     39    object PySequence_InPlaceRepeat(object o, Py_ssize_t count) 
    4040    # Return value: New reference. 
    4141    # Return the result of repeating sequence object o count times, or 
     
    4444    # count". 
    4545 
    46     object PySequence_GetItem(  object o, Py_ssize_t i) 
     46    object PySequence_GetItem(object o, Py_ssize_t i) 
    4747    # Return value: New reference. 
    4848    # Return the ith element of o, or NULL on failure. This is the 
    4949    # equivalent of the Python expression "o[i]". 
    5050 
    51     object PySequence_GetSlice( object o, Py_ssize_t i1, Py_ssize_t i2) 
     51    object PySequence_GetSlice(object o, Py_ssize_t i1, Py_ssize_t i2) 
    5252    # Return value: New reference. 
    5353    # Return the slice of sequence object o between i1 and i2, or NULL 
     
    5555    # "o[i1:i2]". 
    5656 
    57     int PySequence_SetItem(     object o, Py_ssize_t i, object v) 
     57    int PySequence_SetItem(object o, Py_ssize_t i, object v) 
    5858    # Assign object v to the ith element of o. Returns -1 on 
    5959    # failure. This is the equivalent of the Python statement "o[i] = 
    6060    # v". This function does not steal a reference to v. 
    6161 
    62     int PySequence_DelItem(     object o, Py_ssize_t i) 
     62    int PySequence_DelItem(object o, Py_ssize_t i) 
    6363    # Delete the ith element of object o. Returns -1 on failure. This 
    6464    # is the equivalent of the Python statement "del o[i]". 
    6565 
    66     int PySequence_SetSlice(    object o, Py_ssize_t i1, Py_ssize_t i2, object v) 
     66    int PySequence_SetSlice(object o, Py_ssize_t i1, Py_ssize_t i2, object v) 
    6767    # Assign the sequence object v to the slice in sequence object o 
    6868    # from i1 to i2. This is the equivalent of the Python statement 
    6969    # "o[i1:i2] = v". 
    7070 
    71     int PySequence_DelSlice(    object o, Py_ssize_t i1, Py_ssize_t i2) 
     71    int PySequence_DelSlice(object o, Py_ssize_t i1, Py_ssize_t i2) 
    7272    # Delete the slice in sequence object o from i1 to i2. Returns -1 
    7373    # on failure. This is the equivalent of the Python statement "del 
    7474    # o[i1:i2]". 
    7575 
    76     int PySequence_Count(       object o, object value) 
     76    int PySequence_Count(object o, object value) 
    7777    # Return the number of occurrences of value in o, that is, return 
    7878    # the number of keys for which o[key] == value. On failure, return 
     
    8080    # "o.count(value)". 
    8181 
    82     int PySequence_Contains(    object o, object value) 
     82    int PySequence_Contains(object o, object value) 
    8383    # Determine if o contains value. If an item in o is equal to 
    8484    # value, return 1, otherwise return 0. On error, return -1. This 
    8585    # is equivalent to the Python expression "value in o". 
    8686 
    87     int PySequence_Index(       object o, object value) 
     87    int PySequence_Index(object o, object value) 
    8888    # Return the first index i for which o[i] == value. On error, 
    8989    # return -1. This is equivalent to the Python expression 
    9090    # "o.index(value)". 
    9191 
    92     object PySequence_List(     object o) 
     92    object PySequence_List(object o) 
    9393    # Return value: New reference. 
    9494    # Return a list object with the same contents as the arbitrary 
    9595    # sequence o. The returned list is guaranteed to be new. 
    9696 
    97     object PySequence_Tuple(    object o) 
     97    object PySequence_Tuple(object o) 
    9898    # Return value: New reference. 
    9999    # Return a tuple object with the same contents as the arbitrary 
     
    103103    # expression "tuple(o)". 
    104104 
    105     object PySequence_Fast(     object o, char *m) 
     105    object PySequence_Fast(object o, char *m) 
    106106    # Return value: New reference. 
    107107    # Returns the sequence o as a tuple, unless it is already a tuple 
     
    111111    # sequence, raises TypeError with m as the message text. 
    112112 
    113     PyObject* PySequence_Fast_GET_ITEM( object o, Py_ssize_t i) 
     113    PyObject* PySequence_Fast_GET_ITEM(object o, Py_ssize_t i) 
    114114    # Return value: Borrowed reference. 
    115115    # Return the ith element of o, assuming that o was returned by 
    116116    # PySequence_Fast(), o is not NULL, and that i is within bounds. 
    117117 
    118     PyObject** PySequence_Fast_ITEMS(   object o) 
     118    PyObject** PySequence_Fast_ITEMS(object o) 
    119119    # Return the underlying array of PyObject pointers. Assumes that o 
    120120    # was returned by PySequence_Fast() and o is not NULL.  
    121121 
    122     object PySequence_ITEM(     object o, Py_ssize_t i) 
     122    object PySequence_ITEM(object o, Py_ssize_t i) 
    123123    # Return value: New reference. 
    124124    # Return the ith element of o or NULL on failure. Macro form of 
     
    127127    # indices. 
    128128 
    129     int PySequence_Fast_GET_SIZE(       object o) 
     129    int PySequence_Fast_GET_SIZE(object o) 
    130130    # Returns the length of o, assuming that o was returned by 
    131131    # PySequence_Fast() and that o is not NULL. The size can also be 
  • sage/ext/python_set.pxi

    r1765 r4841  
    3838    # iterable Python object. 
    3939 
    40     int PyAnySet_Check( object p) 
     40    int PyAnySet_Check(object p) 
    4141    # Return true if p is a set object, a frozenset object, or an 
    4242    # instance of a subtype. 
    4343 
    44     int PyAnySet_CheckExact(    object p) 
     44    int PyAnySet_CheckExact(object p) 
    4545    # Return true if p is a set object or a frozenset object but not 
    4646    # an instance of a subtype. 
    4747 
    48     int PyFrozenSet_CheckExact( object p) 
     48    int PyFrozenSet_CheckExact(object p) 
    4949    # Return true if p is a frozenset object but not an instance of a subtype.  
    5050 
    51     PySet_New(  object iterable) 
     51    PySet_New(object iterable) 
    5252    # Return value: New reference. 
    5353    # Return a new set containing objects returned by the 
     
    5757    # is also useful for copying a set (c=set(s)). 
    5858 
    59     PyFrozenSet_New(    object iterable) 
     59    PyFrozenSet_New(object iterable) 
    6060    # Return value: New reference. 
    6161    # Return a new frozenset containing objects returned by the 
     
    6666    # The following functions and macros are available for instances of set or frozenset or instances of their subtypes. 
    6767 
    68     int PySet_Size(     object anyset) 
     68    int PySet_Size(object anyset) 
    6969    # Return the length of a set or frozenset object. Equivalent to 
    7070    # "len(anyset)". Raises a PyExc_SystemError if anyset is not a 
    7171    # set, frozenset, or an instance of a subtype. 
    7272 
    73     int PySet_GET_SIZE( object anyset) 
     73    int PySet_GET_SIZE(object anyset) 
    7474    # Macro form of PySet_Size() without error checking.  
    7575 
    76     int PySet_Contains( object anyset, object key) 
     76    int PySet_Contains(object anyset, object key) 
    7777    # Return 1 if found, 0 if not found, and -1 if an error is 
    7878    # encountered. Unlike the Python __contains__() method, this 
     
    8585    # its subtypes but not for instances of frozenset or its subtypes. 
    8686 
    87     int PySet_Add(      object set, object key) 
     87    int PySet_Add(object set, object key) 
    8888    # Add key to a set instance. Does not apply to frozenset 
    8989    # instances. Return 0 on success or -1 on failure. Raise a 
     
    9292    # instance of set or its subtype. 
    9393 
    94     int PySet_Discard(  object set, object key) 
     94    int PySet_Discard(object set, object key) 
    9595    # Return 1 if found and removed, 0 if not found (no action taken), 
    9696    # and -1 if an error is encountered. Does not raise KeyError for 
     
    101101    # of set or its subtype. 
    102102 
    103     PySet_Pop(  object set) 
     103    PySet_Pop(object set) 
    104104    # Return value: New reference. 
    105105    # Return a new reference to an arbitrary object in the set, and 
     
    108108    # not an instance of set or its subtype. 
    109109 
    110     int PySet_Clear(    object set) 
     110    int PySet_Clear(object set) 
    111111    # Empty an existing set of all elements.  
    112112 
  • sage/ext/python_string.pxi

    r1765 r4841  
    1515    # layer.  
    1616 
    17     int PyString_Check( object o) 
     17    int PyString_Check(object o) 
    1818    # Return true if the object o is a string object or an instance of 
    1919    # a subtype of the string type.  
    2020 
    21     int PyString_CheckExact(    object o) 
     21    int PyString_CheckExact(object o) 
    2222    # Return true if the object o is a string object, but not an instance of a subtype of the string type.  
    2323 
    24     object PyString_FromString( char *v) 
     24    object PyString_FromString(char *v) 
    2525    # Return value: New reference. 
    2626    # Return a new string object with the value v on success, and NULL 
     
    2828    # checked. 
    2929 
    30     object PyString_FromStringAndSize(  char *v, Py_ssize_t len) 
     30    object PyString_FromStringAndSize(char *v, Py_ssize_t len) 
    3131    # Return value: New reference. 
    3232    # Return a new string object with the value v and length len on 
     
    3434    # string are uninitialized. 
    3535 
    36     object PyString_FromFormat( char *format, ...) 
     36    object PyString_FromFormat(char *format, ...) 
    3737    # Return value: New reference. 
    3838    # Take a C printf()-style format string and a variable number of 
     
    6363    # extra arguments discarded. 
    6464 
    65     object PyString_FromFormatV(        char *format, va_list vargs) 
     65    object PyString_FromFormatV(char *format, va_list vargs) 
    6666    # Return value: New reference. 
    6767    # Identical to PyString_FromFormat() except that it takes exactly two arguments.  
    6868 
    69     Py_ssize_t PyString_Size(   object string) 
     69    Py_ssize_t PyString_Size(object string) 
    7070    # Return the length of the string in string object string.  
    7171 
    72     Py_ssize_t PyString_GET_SIZE(       object string) 
     72    Py_ssize_t PyString_GET_SIZE(object string) 
    7373    # Macro form of PyString_Size() but without error checking.  
    7474 
    75     char* PyString_AsString(    object string) 
     75    char* PyString_AsString(object string) 
    7676    # Return a NUL-terminated representation of the contents of 
    7777    # string. The pointer refers to the internal buffer of string, not 
     
    8383    # PyString_AsString() returns NULL and raises TypeError. 
    8484 
    85     char* PyString_AS_STRING(   object string) 
     85    char* PyString_AS_STRING(object string) 
    8686    # Macro form of PyString_AsString() but without error 
    8787    # checking. Only string objects are supported; no Unicode objects 
    8888    # should be passed. 
    8989 
    90     int PyString_AsStringAndSize(       object obj, char **buffer, Py_ssize_t *length) 
     90    int PyString_AsStringAndSize(object obj, char **buffer, Py_ssize_t *length) 
    9191    # Return a NULL-terminated representation of the contents of the 
    9292    # object obj through the output variables buffer and length. 
     
    106106    # PyString_AsStringAndSize() returns -1 and raises TypeError. 
    107107 
    108     void PyString_Concat(       PyObject* *string, object newpart) 
     108    void PyString_Concat(PyObject **string, object newpart) 
    109109    # Create a new string object in *string containing the contents of 
    110110    # newpart appended to string; the caller will own the new 
     
    114114    # be set to NULL; the appropriate exception will be set. 
    115115 
    116     void PyString_ConcatAndDel( PyObject* *string, object newpart) 
     116    void PyString_ConcatAndDel(PyObject **string, object newpart) 
    117117    # Create a new string object in *string containing the contents of 
    118118    # newpart appended to string. This version decrements the 
    119119    # reference count of newpart. 
    120120 
    121     int _PyString_Resize(     PyObject * *string, Py_ssize_t newsize) 
     121    int _PyString_Resize(PyObject **string, Py_ssize_t newsize) 
    122122    # A way to resize a string object even though it is 
    123123    # ``immutable''. Only use this to build up a brand new string 
     
    133133    # returned. 
    134134 
    135     object PyString_Format(     object format, object args) 
     135    object PyString_Format(object format, object args) 
    136136    # Return value: New reference.  Return a new string object from 
    137137    # format and args. Analogous to format % args. The args argument 
    138138    # must be a tuple. 
    139139 
    140     void PyString_InternInPlace(     PyObject* *string) 
     140    void PyString_InternInPlace(PyObject **string) 
    141141    # Intern the argument *string in place. The argument must be the 
    142142    # address of a pointer variable pointing to a Python string 
     
    151151    # and only if you owned it before the call.) 
    152152 
    153     object PyString_InternFromString(   char *v) 
     153    object PyString_InternFromString(char *v) 
    154154    # Return value: New reference. 
    155155    # A combination of PyString_FromString() and 
     
    158158    # earlier interned string object with the same value. 
    159159 
    160     object PyString_Decode(     char *s, Py_ssize_t size, char *encoding, char *errors) 
     160    object PyString_Decode(char *s, Py_ssize_t size, char *encoding, char *errors) 
    161161    #  Return value: New reference. 
    162162    # Create an object by decoding size bytes of the encoded buffer s 
     
    167167    # raised by the codec. 
    168168 
    169     object PyString_AsDecodedObject(    object str, char *encoding, char *errors) 
     169    object PyString_AsDecodedObject(object str, char *encoding, char *errors) 
    170170    # Return value: New reference. 
    171171    # Decode a string object by passing it to the codec registered for 
     
    176176    # raised by the codec. 
    177177 
    178     object PyString_Encode(     char *s, Py_ssize_t size, char *encoding, char *errors) 
     178    object PyString_Encode(char *s, Py_ssize_t size, char *encoding, char *errors) 
    179179    # Return value: New reference. 
    180180    # Encode the char buffer of the given size by passing it to the 
     
    185185    # registry. Return NULL if an exception was raised by the codec. 
    186186 
    187     object PyString_AsEncodedObject(    object str, char *encoding, char *errors) 
     187    object PyString_AsEncodedObject(object str, char *encoding, char *errors) 
    188188    # Return value: New reference. 
    189189    # Encode a string object using the codec registered for encoding 
  • sage/ext/python_type.pxi

    r1765 r4841  
    1212    # as type and types.TypeType in the Python layer. 
    1313 
    14     int PyType_Check(   object o) 
     14    int PyType_Check(object o) 
    1515    # Return true if the object o is a type object, including 
    1616    # instances of types derived from the standard type object. Return 
    1717    # false in all other cases. 
    1818 
    19     int PyType_CheckExact(      object o) 
     19    int PyType_CheckExact(object o) 
    2020    # Return true if the object o is a type object, but not a subtype 
    2121    # of the standard type object. Return false in all other 
    2222    # cases. 
    2323 
    24     int PyType_HasFeature(      object o, int feature) 
     24    int PyType_HasFeature(object o, int feature) 
    2525    # Return true if the type object o sets the feature feature. Type 
    2626    # features are denoted by single bit flags. 
    2727 
    28     int PyType_IS_GC(   object o) 
     28    int PyType_IS_GC(object o) 
    2929    # Return true if the type object includes support for the cycle 
    3030    # detector; this tests the type flag Py_TPFLAGS_HAVE_GC.  
    3131 
    32     int PyType_IsSubtype(       object a, object b) 
     32    int PyType_IsSubtype(object a, object b) 
    3333    # Return true if a is a subtype of b.  
    3434 
    35     object PyType_GenericAlloc( object type, Py_ssize_t nitems) 
     35    object PyType_GenericAlloc(object type, Py_ssize_t nitems) 
    3636    # Return value: New reference. 
    3737 
    38     object PyType_GenericNew(   object type, object args, object kwds) 
     38    object PyType_GenericNew(object type, object args, object kwds) 
    3939    # Return value: New reference. 
    4040 
    41     int PyType_Ready(   object type) 
     41    int PyType_Ready(object type) 
    4242    # Finalize a type object. This should be called on all type 
    4343    # objects to finish their initialization. This function is 
Note: See TracChangeset for help on using the changeset viewer.