| |
- builtins.list(builtins.object)
-
- seclist
- builtins.object
-
- secindex
class secindex(builtins.object) |
|
secindex(*args, offset=0, sectype=None)
Provisional class to facilitate more efficient manipulation of secure indices. |
|
Methods defined here:
- __add__(self, other)
- __await__(self)
- async __index__(self)
- __init__(self, *args, offset=0, sectype=None)
- Initialize self. See help(type(self)) for accurate signature.
Static methods defined here:
- random(sectype, length, offset=0)
Data descriptors defined here:
- offset
- sectype
- value
|
class seclist(builtins.list) |
|
seclist(x=(), sectype=None)
|
|
- Method resolution order:
- seclist
- builtins.list
- builtins.object
Methods defined here:
- __add__(self, other)
- Return self+value.
- __contains__(self, item)
- Not implemented for secure lists.
Corresponds to "item in self", which is defined as a public Boolean value in Python.
Instead, use seclist.contains(self, item) to get a secure Boolean result in MPyC.
- __delitem__(self, key)
- Called to delete self[key], where key is either public or secret.
If key is a public integer (or a slice), the behavior is the same as for ordinary lists.
If key is a secure number or index, the list element at the secret position is removed.
- __eq__(self, other)
- Return self==value.
- __ge__(self, other)
- Return self>=value.
- __getitem__(self, key)
- Called to evaluate self[key], where key is either public or secret.
If key is a public integer (or a slice), the behavior is the same as for ordinary lists.
If key is a secure number or index, the value at the secret position is returned.
- __gt__(self, other)
- Return self>value.
- __iadd__(self, other)
- Implement self+=value.
- __imul__(self, other)
- Implement self*=value.
- __init__(self, x=(), sectype=None)
- Build a secure list from the items in iterable x using the given secure type.
If no secure type is given, it is inferred from the items in x.
Invariant: all items in a secure list are of the same secure type.
- __le__(self, other)
- Return self<=value.
- __lt__(self, other)
- Return self<value.
- __mul__(self, other)
- Return self*value.
- __ne__(self, other)
- Return self!=value.
- __radd__(self, other)
- __rmul__(self, other)
- Return value*self.
- __setitem__(self, key, value)
- Called to set self[key] = value, where key is either public or secret.
The type of value should fit with the type of the list.
If key is a public integer (or a slice), the behavior is the same as for ordinary lists.
If key is a secure number or index, the list is updated at the secret position.
- append(self, other)
- Append object to the end of the list.
- contains(self, item)
- Check if item occurs in self.
- copy(self)
- Return a shallow copy of the list.
- count(self, value)
- Return the number of occurrences of value.
- extend(self, other)
- Extend list by appending elements from the iterable.
- find(self, value)
- Return index of the first occurrence of value.
If value is not present, then index is equal to -1.
- index(self, value)
- Return index of the first occurrence of value.
Raise ValueError if value is not present.
- insert(self, key, value)
- Insert value before position given by key, where key is either public or secret.
The key should fit with the length of the list: 0 <= key <= len(self).
The type of value should fit with the type of the list.
If key is a public integer, the behavior is the same as for ordinary lists.
If key is a secure number or index, the value is inserted at the secret position.
- pop(self, key=-1)
- Remove and return value at position given by key, where key is either public or secret.
If key is a public integer, the behavior is the same as for ordinary lists.
If key is a secure number or index, the item at the secret position is removed,
where 0 <= key < len(self).
- remove(self, value) -> _asyncio.Future
- Remove first occurrence of value.
Raise ValueError if value is not present.
- sort(self, key=None, reverse=False)
- Sort the list in-place, similar to Python's list.sort().
See runtime.sorted() for details on key etc.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- __hash__ = None
- sectype = None
Methods inherited from builtins.list:
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __iter__(self, /)
- Implement iter(self).
- __len__(self, /)
- Return len(self).
- __repr__(self, /)
- Return repr(self).
- __reversed__(self, /)
- Return a reverse iterator over the list.
- __sizeof__(self, /)
- Return the size of the list in memory, in bytes.
- clear(self, /)
- Remove all items from list.
- reverse(self, /)
- Reverse *IN PLACE*.
Class methods inherited from builtins.list:
- __class_getitem__(...) from builtins.type
- See PEP 585
Static methods inherited from builtins.list:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
| |