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

Module analysis.operators

Operator definitions.

Copyright (C) 2005 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_unary_operator(node)

Variable Summary
dict binary_methods = {<class compiler.ast.Sub at 0xb7bcb2fc>...
dict comparison_methods = {'>=': ('__ge__', '__le__'), '==': ...
dict list_methods = {<class compiler.ast.Bitor at 0xb7bc295c>...
dict unary_method = {<class compiler.ast.Invert at 0xb7bc2e3c...

Variable Details

binary_methods

Type:
dict
Value:
{<class compiler.ast.Add at 0xb7bc274c>: ('__add__', '__radd__'),
 <class compiler.ast.Div at 0xb7bc2b6c>: ('__div__', '__rdiv__'),
 <class compiler.ast.LeftShift at 0xb7bc2ecc>: ('__lshift__', '__rlshi\
ft__'),
 <class compiler.ast.Mod at 0xb7bc2fbc>: ('__mod__', '__rmod__'),
 <class compiler.ast.Mul at 0xb7bcb05c>: ('__mul__', '__rmul__'),
 <class compiler.ast.Power at 0xb7bcb14c>: ('__pow__', '__rpow__'),
 <class compiler.ast.RightShift at 0xb7bcb23c>: ('__rshift__', '__rrsh\
...                                                                    

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 0xb7bc292c>: ('__and__', '__rand__'),
 <class compiler.ast.Bitor at 0xb7bc295c>: ('__or__', '__ror__'),
 <class compiler.ast.Bitxor at 0xb7bc298c>: ('__xor__', '__rxor__')}   

unary_method

Type:
dict
Value:
{<class compiler.ast.Invert at 0xb7bc2e3c>: '__invert__'}              

Generated by Epydoc 2.1 on Tue Dec 20 00:05:45 2005 http://epydoc.sf.net