Package analysis :: Module operators
[show private | hide private]
[frames | no frames]

Module analysis.operators

Operator definitions.

Copyright (C) 2005, 2006 Paul Boddie <paul@boddie.org.uk>

This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; see the file LICENCE.txt If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Classes
Op Special comparison operator node.

Function Summary
  get_binary_methods(operator)
  get_comparison_methods(operator_name)
  get_list_methods(operator)
  get_unary_method(operator)
  is_binary_operator(node)
  is_list_operator(node)
  is_sequence_operator(node)
  is_unary_operator(node)

Variable Summary
dict augmented_methods = {'-=': '__isub__', '*=': '__imul__',...
dict binary_methods = {<class compiler.ast.Sub at 0xb7bc926c>...
dict comparison_methods = {'>=': ('__ge__', '__le__'), '==': ...
dict list_methods = {<class compiler.ast.Bitor at 0xb7e2a8cc>...
dict unary_method = {<class compiler.ast.UnaryAdd at 0xb7bc93...

Variable Details

augmented_methods

Type:
dict
Value:
{'-=': '__isub__', '*=': '__imul__', '/=': '__idiv__', '+=': '__iadd__\
'}                                                                     

binary_methods

Type:
dict
Value:
{<class compiler.ast.Power at 0xb7bc90bc>: ('__pow__', '__rpow__'),
 <class compiler.ast.RightShift at 0xb7bc91ac>: ('__rshift__', '__rrsh\
ift__'),
 <class compiler.ast.Sub at 0xb7bc926c>: ('__sub__', '__rsub__'),
 <class compiler.ast.Add at 0xb7e2a6bc>: ('__add__', '__radd__'),
 <class compiler.ast.Div at 0xb7e2aadc>: ('__div__', '__rdiv__'),
 <class compiler.ast.LeftShift at 0xb7e2ae3c>: ('__lshift__', '__rlshi\
ft__'),
...                                                                    

comparison_methods

Type:
dict
Value:
{'!=': ('__ne__', '__ne__'),
 '<': ('__lt__', '__gt__'),
 '<=': ('__le__', '__ge__'),
 '==': ('__eq__', '__eq__'),
 '>': ('__gt__', '__lt__'),
 '>=': ('__ge__', '__le__'),
 'in': ('__contains__', None),
 'is': (None, None),
...                                                                    

list_methods

Type:
dict
Value:
{<class compiler.ast.Bitand at 0xb7e2a89c>: ('__and__', '__rand__'),
 <class compiler.ast.Bitor at 0xb7e2a8cc>: ('__or__', '__ror__'),
 <class compiler.ast.Bitxor at 0xb7e2a8fc>: ('__xor__', '__rxor__')}   

unary_method

Type:
dict
Value:
{<class compiler.ast.UnaryAdd at 0xb7bc935c>: '__pos__',
 <class compiler.ast.UnarySub at 0xb7bc938c>: '__neg__',
 <class compiler.ast.Invert at 0xb7e2adac>: '__invert__'}              

Generated by Epydoc 2.1 on Fri May 19 01:52:26 2006 http://epydoc.sf.net