rope.base.pyobjects
Exceptions
Base exception for rope |
Classes
Python defined names that rope can access their sources |
|
Python defined names that rope can access their sources |
|
Python defined names that rope can access their sources |
|
Python defined names that rope can access their sources |
|
Python defined names that rope can access their sources |
|
Python defined names that rope can access their sources |
Functions
|
Return the base type with name name. |
Return a pyobject whose type is unknown |
Module Contents
- class rope.base.pyobjects.PyObject(type_)
- type
- get_attributes()
- get_attribute(name)
- get_module()
- get_type()
- rope.base.pyobjects.get_base_type(name)
Return the base type with name name.
The base types are ‘Type’, ‘Function’, ‘Module’ and ‘Unknown’. It was used to check the type of a PyObject but currently its use is discouraged. Use classes defined in this module instead. For example instead of
pyobject.get_type() == get_base_type('Function')useisinstance(pyobject, AbstractFunction).You can use AbstractClass for classes, AbstractFunction for functions, and AbstractModule for modules. You can also use PyFunction and PyClass for testing if an object is defined somewhere and rope can access its source. These classes provide more methods.
- rope.base.pyobjects.get_unknown()
Return a pyobject whose type is unknown
Note that two unknown objects are equal. So for example you can write:
if pyname.get_object() == get_unknown(): print('cannot determine what this pyname holds')
Rope could have used None for indicating unknown objects but we had to check that in many places. So actually this method returns a null object.
- class rope.base.pyobjects.AbstractClass
Bases:
PyObject- get_name()
- get_doc()
- get_superclasses()
- type
- get_attributes()
- get_attribute(name)
- get_module()
- get_type()
- class rope.base.pyobjects.AbstractFunction
Bases:
PyObject- get_name()
- get_doc()
- get_param_names(special_args=True)
- get_returned_object(args)
- type
- get_attributes()
- get_attribute(name)
- get_module()
- get_type()
- class rope.base.pyobjects.AbstractModule(doc=None)
Bases:
PyObject- get_doc()
- get_resource()
- type
- get_attributes()
- get_attribute(name)
- get_module()
- get_type()
- class rope.base.pyobjects.PyDefinedObject(pycore, ast_node, parent)
Python defined names that rope can access their sources
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- property absolute_name
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_name()
- get_ast()
- class rope.base.pyobjects.PyFunction(pycore, ast_node, parent)
Bases:
PyDefinedObject,AbstractFunctionPython defined names that rope can access their sources
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- property absolute_name
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_name()
- get_ast()
- get_param_names(special_args=True)
- get_returned_object(args)
- type
- get_type()
- class rope.base.pyobjects.PyComprehension(pycore, ast_node, parent)
Bases:
PyDefinedObject,PyObjectPython defined names that rope can access their sources
- get_name()
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- property absolute_name
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_ast()
- type
- get_type()
- class rope.base.pyobjects.PyClass(pycore, ast_node, parent)
Bases:
PyDefinedObject,AbstractClassPython defined names that rope can access their sources
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- property absolute_name
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_name()
- get_ast()
- get_superclasses()
- type
- get_type()
- class rope.base.pyobjects.PyModule(pycore, ast_node, resource)
Bases:
_PyModulePython defined names that rope can access their sources
- resource
- concluded_data = []
- get_resource()
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_name()
- get_ast()
- type
- get_type()
- class rope.base.pyobjects.PyPackage(pycore, ast_node, resource)
Bases:
_PyModulePython defined names that rope can access their sources
- resource
- concluded_data = []
- get_resource()
- pycore
- ast_node
- scope = None
- parent
- structural_attributes = None
- concluded_attributes
- attributes
- defineds = None
- visitor_class = None
- get_attributes()
- get_attribute(name)
- get_scope()
- get_module()
- get_name()
- get_ast()
- type
- get_type()
- exception rope.base.pyobjects.IsBeingInferredError
Bases:
rope.base.exceptions.RopeErrorBase exception for rope