From: ggellner@encolpuis Date: Sat, 10 Jan 2009 04:22:18 +0000 (-0500) Subject: Updated version number. Changed tables in special_methods.rst to deal with Sphinx... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=152cf3b3d9724712077b72d3e6f237699c4c1107;p=cython.git Updated version number. Changed tables in special_methods.rst to deal with Sphinx lack of fancy table support for latex output --- diff --git a/conf.py b/conf.py index a86633d4..014df99d 100644 --- a/conf.py +++ b/conf.py @@ -48,9 +48,9 @@ copyright = '2008, Stefan Behnel, Robert Bradshaw, Grew Ewing, William Stein, Ga # other places throughout the built documents. # # The short X.Y version. -version = '0.9.8.1' +version = '0.10' # The full version, including alpha/beta/rc tags. -release = '0.9.8.1.1' +release = '0.10.3' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/docs/special_methods.rst b/docs/special_methods.rst index f49d6a58..d1866e25 100644 --- a/docs/special_methods.rst +++ b/docs/special_methods.rst @@ -149,11 +149,12 @@ with no type specified in the table are generic Python objects. You don't have to declare your method as taking these parameter types. If you declare different types, conversions will be performed as necessary. +General +^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | Name | Parameters | Return type | Description | -+-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| General | -+-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ ++=======================+=======================================+=============+=====================================================+ | __cinit__ |self, ... | | Basic initialisation (no direct Python equivalent) | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __init__ |self, ... | | Further initialisation | @@ -180,8 +181,13 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __delattr__ |self, name | | Delete attribute | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Arithmetic operators | + +Arithmetic operators +^^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __add__ | x, y | object | binary `+` operator | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __sub__ | x, y | object | binary `-` operator | @@ -220,8 +226,13 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __xor__ | x, y | object | `^` operator | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Numeric conversions | + +Numeric conversions +^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __int__ | self | object | Convert to integer | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __long__ | self | object | Convert to long integer | @@ -234,8 +245,13 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __index__ (2.5+ only) | self | object | Convert to sequence index | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| In-place arithmetic operators | + +In-place arithmetic operators +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __iadd__ | self, x | object | `+=` operator | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __isub__ | self, x | object | `-=` operator | @@ -262,8 +278,13 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __ixor__ | self, x | object | `^=` operator | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Sequences and mappings | + +Sequences and mappings +^^^^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __len__ | self int | | len(self) | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __getitem__ | self, x | object | self[x] | @@ -280,12 +301,22 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __contains__ | self, x | int | x in self | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Iterators | + +Iterators +^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __next__ | self | object | Get next item (called next in Python) | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Buffer interface (no Python equivalents - see note 1) | + +Buffer interface (no Python equivalents - see note 1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __getreadbuffer__ | self, int i, void `**p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __getwritebuffer__ | self, int i, void `**p` | | | @@ -294,8 +325,13 @@ declare different types, conversions will be performed as necessary. +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __getcharbuffer__ | self, int i, char `**p` | | | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ -| Descriptor objects (see note 2) | + +Descriptor objects (see note 2) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ +| Name | Parameters | Return type | Description | ++=======================+=======================================+=============+=====================================================+ | __get__ | self, instance, class | object | Get value of attribute | +-----------------------+---------------------------------------+-------------+-----------------------------------------------------+ | __set__ | self, instance, value | | Set value of attribute | diff --git a/sphinxext/cython_highlighting.py b/sphinxext/cython_highlighting.py index 615aab4e..c86d9972 100644 --- a/sphinxext/cython_highlighting.py +++ b/sphinxext/cython_highlighting.py @@ -156,6 +156,7 @@ class CythonLexer(RegexLexer): ], } + ##TODO: fix this, as shebang lines don't make sense for cython. def analyse_text(text): return shebang_matches(text, r'pythonw?(2\.\d)?') diff --git a/sphinxext/cython_highlighting.pyc b/sphinxext/cython_highlighting.pyc index e026e9eb..d80f201a 100644 Binary files a/sphinxext/cython_highlighting.pyc and b/sphinxext/cython_highlighting.pyc differ diff --git a/sphinxext/ipython_console_highlighting.pyc b/sphinxext/ipython_console_highlighting.pyc index 4c0dea0f..9d8a8c1c 100644 Binary files a/sphinxext/ipython_console_highlighting.pyc and b/sphinxext/ipython_console_highlighting.pyc differ