[Python-checkins] r69799 - in python/branches/release30-maint: Doc/reference/expressions.rst Doc/reference/introduction.rst

benjamin.peterson python-checkins at python.org
Fri Feb 20 05:05:33 CET 2009


Author: benjamin.peterson
Date: Fri Feb 20 05:05:32 2009
New Revision: 69799

Log:
Merged revisions 69798 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r69798 | benjamin.peterson | 2009-02-19 22:02:38 -0600 (Thu, 19 Feb 2009) | 13 lines
  
  Merged revisions 69769,69776 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r69769 | georg.brandl | 2009-02-19 02:30:06 -0600 (Thu, 19 Feb 2009) | 1 line
    
    #5310, #3558: fix operator precedence table.
  ........
    r69776 | georg.brandl | 2009-02-19 10:34:51 -0600 (Thu, 19 Feb 2009) | 2 lines
    
    #5317: update IronPython URL.
  ........
................


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Doc/reference/expressions.rst
   python/branches/release30-maint/Doc/reference/introduction.rst

Modified: python/branches/release30-maint/Doc/reference/expressions.rst
==============================================================================
--- python/branches/release30-maint/Doc/reference/expressions.rst	(original)
+++ python/branches/release30-maint/Doc/reference/expressions.rst	Fri Feb 20 05:05:32 2009
@@ -785,14 +785,14 @@
 
 .. _unary:
 
-Unary arithmetic operations
-===========================
+Unary arithmetic and bitwise operations
+=======================================
 
 .. index::
    triple: unary; arithmetic; operation
    triple: unary; bitwise; operation
 
-All unary arithmetic (and bitwise) operations have the same priority:
+All unary arithmetic and bitwise operations have the same priority:
 
 .. productionlist::
    u_expr: `power` | "-" `u_expr` | "+" `u_expr` | "~" `u_expr`
@@ -1240,56 +1240,46 @@
 left to right --- see section :ref:`comparisons` --- and exponentiation, which
 groups from right to left).
 
-+----------------------------------------------+-------------------------------------+
-| Operator                                     | Description                         |
-+==============================================+=====================================+
-| :keyword:`lambda`                            | Lambda expression                   |
-+----------------------------------------------+-------------------------------------+
-| :keyword:`or`                                | Boolean OR                          |
-+----------------------------------------------+-------------------------------------+
-| :keyword:`and`                               | Boolean AND                         |
-+----------------------------------------------+-------------------------------------+
-| :keyword:`not` *x*                           | Boolean NOT                         |
-+----------------------------------------------+-------------------------------------+
-| :keyword:`in`, :keyword:`not` :keyword:`in`  | Membership tests                    |
-+----------------------------------------------+-------------------------------------+
-| :keyword:`is`, :keyword:`is not`             | Identity tests                      |
-+----------------------------------------------+-------------------------------------+
-| ``<``, ``<=``, ``>``, ``>=``, ``!=``, ``==`` | Comparisons                         |
-+----------------------------------------------+-------------------------------------+
-| ``|``                                        | Bitwise OR                          |
-+----------------------------------------------+-------------------------------------+
-| ``^``                                        | Bitwise XOR                         |
-+----------------------------------------------+-------------------------------------+
-| ``&``                                        | Bitwise AND                         |
-+----------------------------------------------+-------------------------------------+
-| ``<<``, ``>>``                               | Shifts                              |
-+----------------------------------------------+-------------------------------------+
-| ``+``, ``-``                                 | Addition and subtraction            |
-+----------------------------------------------+-------------------------------------+
-| ``*``, ``/``, ``//``, ``%``                  | Multiplication, division, remainder |
-+----------------------------------------------+-------------------------------------+
-| ``+x``, ``-x``                               | Positive, negative                  |
-+----------------------------------------------+-------------------------------------+
-| ``~x``                                       | Bitwise not                         |
-+----------------------------------------------+-------------------------------------+
-| ``**``                                       | Exponentiation                      |
-+----------------------------------------------+-------------------------------------+
-| ``x[index]``                                 | Subscription                        |
-+----------------------------------------------+-------------------------------------+
-| ``x[index:index]``                           | Slicing                             |
-+----------------------------------------------+-------------------------------------+
-| ``x(arguments...)``                          | Call                                |
-+----------------------------------------------+-------------------------------------+
-| ``x.attribute``                              | Attribute reference                 |
-+----------------------------------------------+-------------------------------------+
-| ``(expressions...)``                         | Binding, tuple display, generator   |
-|                                              | expressions                         |
-+----------------------------------------------+-------------------------------------+
-| ``[expressions...]``                         | List display                        |
-+----------------------------------------------+-------------------------------------+
-| ``{expressions...}``                         | Dictionary or set display           |
-+----------------------------------------------+-------------------------------------+
+
++-----------------------------------------------+-------------------------------------+
+| Operator                                      | Description                         |
++===============================================+=====================================+
+| :keyword:`lambda`                             | Lambda expression                   |
++-----------------------------------------------+-------------------------------------+
+| :keyword:`or`                                 | Boolean OR                          |
++-----------------------------------------------+-------------------------------------+
+| :keyword:`and`                                | Boolean AND                         |
++-----------------------------------------------+-------------------------------------+
+| :keyword:`not` *x*                            | Boolean NOT                         |
++-----------------------------------------------+-------------------------------------+
+| :keyword:`in`, :keyword:`not` :keyword:`in`,  | Comparisons, including membership   |
+| :keyword:`is`, :keyword:`is not`, ``<``,      | tests and identity tests,           |
+| ``<=``, ``>``, ``>=``, ``<>``, ``!=``, ``==`` |                                     |
++-----------------------------------------------+-------------------------------------+
+| ``|``                                         | Bitwise OR                          |
++-----------------------------------------------+-------------------------------------+
+| ``^``                                         | Bitwise XOR                         |
++-----------------------------------------------+-------------------------------------+
+| ``&``                                         | Bitwise AND                         |
++-----------------------------------------------+-------------------------------------+
+| ``<<``, ``>>``                                | Shifts                              |
++-----------------------------------------------+-------------------------------------+
+| ``+``, ``-``                                  | Addition and subtraction            |
++-----------------------------------------------+-------------------------------------+
+| ``*``, ``/``, ``//``, ``%``                   | Multiplication, division, remainder |
++-----------------------------------------------+-------------------------------------+
+| ``+x``, ``-x``, ``~x``                        | Positive, negative, bitwise NOT     |
++-----------------------------------------------+-------------------------------------+
+| ``**``                                        | Exponentiation [#]_                 |
++-----------------------------------------------+-------------------------------------+
+| ``x[index]``, ``x[index:index]``,             | Subscription, slicing,              |
+| ``x(arguments...)``, ``x.attribute``          | call, attribute reference           |
++-----------------------------------------------+-------------------------------------+
+| ``(expressions...)``,                         | Binding or tuple display,           |
+| ``[expressions...]``,                         | list display,                       |
+| ``{key:datum...}``,                           | dictionary display,                 |
++-----------------------------------------------+-------------------------------------+
+
 
 .. rubric:: Footnotes
 
@@ -1327,3 +1317,6 @@
    descriptors, you may notice seemingly unusual behaviour in certain uses of
    the :keyword:`is` operator, like those involving comparisons between instance
    methods, or constants.  Check their documentation for more info.
+
+.. [#] The power operator ``**`` binds less tightly than an arithmetic or
+   bitwise unary operator on its right, that is, ``2**-1`` is ``0.5``.

Modified: python/branches/release30-maint/Doc/reference/introduction.rst
==============================================================================
--- python/branches/release30-maint/Doc/reference/introduction.rst	(original)
+++ python/branches/release30-maint/Doc/reference/introduction.rst	Fri Feb 20 05:05:32 2009
@@ -66,8 +66,7 @@
    An alternate Python for .NET.  Unlike Python.NET, this is a complete Python
    implementation that generates IL, and compiles Python code directly to .NET
    assemblies.  It was created by Jim Hugunin, the original creator of Jython.  For
-   more information, see `the IronPython website
-   <http://workspaces.gotdotnet.com/ironpython>`_.
+   more information, see `the IronPython website <http://www.ironpython.com/>`_.
 
 PyPy
    An implementation of Python written in Python; even the bytecode interpreter is


More information about the Python-checkins mailing list