Package bap :: Module adt :: Class Seq
[hide private]
[frames] | no frames]

Class Seq

source code

           object --+    
                    |    
                  ADT --+
                        |
       object --+       |
                |       |
    _abcoll.Sized --+   |
                    |   |
       object --+   |   |
                |   |   |
 _abcoll.Iterable --+   |
                    |   |
       object --+   |   |
                |   |   |
_abcoll.Container --+   |
                    |   |
     _abcoll.Sequence --+
                        |
                       Seq
Known Subclasses:

Nested Classes [hide private]

Inherited from _abcoll.Sized: __metaclass__

Instance Methods [hide private]
 
__init__(self, *args)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__getitem__(self, i) source code
 
__len__(self) source code
t
find(key, d=None)
Looks up for a term that matches with a given key.
source code

Inherited from ADT: __cmp__, __repr__

Inherited from _abcoll.Sequence: __contains__, __iter__, __reversed__, count, index

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__

Class Methods [hide private]

Inherited from _abcoll.Sized: __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x7f33fa2...
  _abc_negative_cache_version = 18
  _abc_registry = <_weakrefset.WeakSet object at 0x7f33fa254350>

Inherited from _abcoll.Sized (private): _abc_cache

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__getitem__(self, i)
(Indexing operator)

source code 
Overrides: _abcoll.Sequence.__getitem__

__len__(self)
(Length operator)

source code 
Overrides: _abcoll.Sized.__len__

find(key, d=None)

source code 
Looks up for a term that matches with a given key.

If the key is a string, starting with `@' or `%', then a term
with the given identifier name is returned.  Otherwise a term
with a matching `name' attribute is returned (useful to find
subroutines).

If a key is an instance of Tid class, then a term with
corresponding tid is returned.

If a key is a number, or an instance of `bil.Int' class, then
a term with a matching address is returned.

Example
-------

In the following example, all searches return the
same object


>>> main = proj.program.subs.find('main')
>>> main = proj.program.subs.find(main.id)
>>> main = proj.program.subs.find(main.id.name)

Returns: t

Class Variable Details [hide private]

_abc_negative_cache

Value:
<_weakrefset.WeakSet object at 0x7f33fa254490>