From 152cf3b3d9724712077b72d3e6f237699c4c1107 Mon Sep 17 00:00:00 2001 From: "ggellner@encolpuis" Date: Fri, 9 Jan 2009 23:22:18 -0500 Subject: [PATCH] Updated version number. Changed tables in special_methods.rst to deal with Sphinx lack of fancy table support for latex output --- conf.py | 4 +- docs/special_methods.rst | 56 +++++++++++++++++---- sphinxext/cython_highlighting.py | 1 + sphinxext/cython_highlighting.pyc | Bin 5706 -> 5706 bytes sphinxext/ipython_console_highlighting.pyc | Bin 2564 -> 2564 bytes 5 files changed, 49 insertions(+), 12 deletions(-) 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 e026e9ebd69510c615e074cfa3dfaa5d95d81034..d80f201a13019d4bbc9de6c3d78d5dad8045883a 100644 GIT binary patch delta 33 pcmX@5b4rI}^Cw=eX%S)H{E3%~XaD_;?0-1{G5ZEw delta 16 XcmZn>X%S)H{E3&#B=_+~_P?9}F*^n} -- 2.26.2