| |
- Method resolution order:
- Direction
- builtins.dict
- builtins.object
Methods defined here:
- __init__(self, dictionary=None, **keywords)
- absolute(self)
- copy(self)
- down(self)
- horizontal(self)
- horizontal_direction(self)
- left(self)
- move(self, direction, override=None, minimum=0, maximum=9999, current=0, pagesize=1, offset=0)
- Calculates the new position in a given boundary.
Example:
>>> d = Direction(pages=True)
>>> d.move(direction=3)
3
>>> d.move(direction=3, current=2)
5
>>> d.move(direction=3, pagesize=5)
15
>>> # Note: we start to count at zero.
>>> d.move(direction=3, pagesize=5, maximum=10)
9
>>> d.move(direction=9, override=2)
18
- multiply(self, n)
- pages(self)
- percentage(self)
- relative(self)
- right(self)
- select(self, lst, current, pagesize, override=None, offset=1)
- set(self, n)
- up(self)
- vertical(self)
- vertical_direction(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from builtins.dict:
- __contains__(self, key, /)
- True if D has a key k, else False.
- __delitem__(self, key, /)
- Delete self[key].
- __eq__(self, value, /)
- Return self==value.
- __ge__(...)
- __ge__=($self, value, /)
--
Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(self, value, /)
- Return self>value.
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __ne__(self, value, /)
- Return self!=value.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- __repr__(self, /)
- Return repr(self).
- __setitem__(self, key, value, /)
- Set self[key] to value.
- __sizeof__(...)
- D.__sizeof__() -> size of D in memory, in bytes
- clear(...)
- D.clear() -> None. Remove all items from D.
- fromkeys(iterable, value=None, /) from builtins.type
- Returns a new dict with keys from iterable and values equal to value.
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- items(...)
- D.items() -> a set-like object providing a view on D's items
- keys(...)
- D.keys() -> a set-like object providing a view on D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty.
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]
- values(...)
- D.values() -> an object providing a view on D's values
Data and other attributes inherited from builtins.dict:
- __hash__ = None
|