💾 Archived View for tris.fyi › pydoc › collections.abc captured on 2023-04-26 at 13:36:16. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Back to module index

Go to module by name

collections

collections.abc

This module has no docstring.

Classes

AsyncGenerator

aclose(self)

  Raise GeneratorExit inside coroutine.
        
asend(self, value)

  Send a value into the asynchronous generator.
          Return next yielded value or raise StopAsyncIteration.
        
athrow(self, typ, val=None, tb=None)

  Raise an exception in the asynchronous generator.
          Return next yielded value or raise StopAsyncIteration.
        

AsyncIterable

AsyncIterator

Awaitable

ByteString

This unifies bytes and bytearray.

    XXX Should add all their methods.
    
count(self, value)

  S.count(value) -> integer -- return number of occurrences of value
index(self, value, start=0, stop=None)

  S.index(value, [start, [stop]]) -> integer -- return first index of value.
             Raises ValueError if the value is not present.

             Supporting start and stop arguments is optional, but
             recommended.
        

Callable

Collection

Container

Coroutine

close(self)

  Raise GeneratorExit inside coroutine.
        
send(self, value)

  Send a value into the coroutine.
          Return next yielded value or raise StopIteration.
        
throw(self, typ, val=None, tb=None)

  Raise an exception in the coroutine.
          Return next yielded value or raise StopIteration.
        

Generator

close(self)

  Raise GeneratorExit inside generator.
        
send(self, value)

  Send a value into the generator.
          Return next yielded value or raise StopIteration.
        
throw(self, typ, val=None, tb=None)

  Raise an exception in the generator.
          Return next yielded value or raise StopIteration.
        

Hashable

ItemsView

isdisjoint(self, other)

  Return True if two sets have a null intersection.

Iterable

Iterator

KeysView

isdisjoint(self, other)

  Return True if two sets have a null intersection.

Mapping

A Mapping is a generic container for associating key/value
    pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __iter__, and __len__.
    
get(self, key, default=None)

  D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
items(self)

  D.items() -> a set-like object providing a view on D's items
keys(self)

  D.keys() -> a set-like object providing a view on D's keys
values(self)

  D.values() -> an object providing a view on D's values

MappingView

MutableMapping

A MutableMapping is a generic container for associating
    key/value pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __setitem__, __delitem__,
    __iter__, and __len__.
    
clear(self)

  D.clear() -> None.  Remove all items from D.
get(self, key, default=None)

  D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
items(self)

  D.items() -> a set-like object providing a view on D's items
keys(self)

  D.keys() -> a set-like object providing a view on D's keys
pop(self, key, default=<object object at 0x7f75e3c94190>)

  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(self)

  D.popitem() -> (k, v), remove and return some (key, value) pair
             as a 2-tuple; but raise KeyError if D is empty.
        
setdefault(self, key, default=None)

  D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(self, other=(), /, **kwds)

   D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
              If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
              If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
              In either case, this is followed by: for k, v in F.items(): D[k] = v
        
values(self)

  D.values() -> an object providing a view on D's values

MutableSequence

All the operations on a read-write sequence.

    Concrete subclasses must provide __new__ or __init__,
    __getitem__, __setitem__, __delitem__, __len__, and insert().
    
append(self, value)

  S.append(value) -- append value to the end of the sequence
clear(self)

  S.clear() -> None -- remove all items from S
count(self, value)

  S.count(value) -> integer -- return number of occurrences of value
extend(self, values)

  S.extend(iterable) -- extend sequence by appending elements from the iterable
index(self, value, start=0, stop=None)

  S.index(value, [start, [stop]]) -> integer -- return first index of value.
             Raises ValueError if the value is not present.

             Supporting start and stop arguments is optional, but
             recommended.
        
insert(self, index, value)

  S.insert(index, value) -- insert value before index
pop(self, index=-1)

  S.pop([index]) -> item -- remove and return item at index (default last).
             Raise IndexError if list is empty or index is out of range.
        
remove(self, value)

  S.remove(value) -- remove first occurrence of value.
             Raise ValueError if the value is not present.
        
reverse(self)

  S.reverse() -- reverse *IN PLACE*

MutableSet

A mutable set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__, __len__,
    add(), and discard().

    To override the comparisons (presumably for speed, as the
    semantics are fixed), all you have to do is redefine __le__ and
    then the other operations will automatically follow suit.
    
add(self, value)

  Add an element.
clear(self)

  This is slow (creates N new iterators!) but effective.
discard(self, value)

  Remove an element.  Do not raise an exception if absent.
isdisjoint(self, other)

  Return True if two sets have a null intersection.
pop(self)

  Return the popped value.  Raise KeyError if empty.
remove(self, value)

  Remove an element. If not a member, raise a KeyError.

Reversible

Sequence

All the operations on a read-only sequence.

    Concrete subclasses must override __new__ or __init__,
    __getitem__, and __len__.
    
count(self, value)

  S.count(value) -> integer -- return number of occurrences of value
index(self, value, start=0, stop=None)

  S.index(value, [start, [stop]]) -> integer -- return first index of value.
             Raises ValueError if the value is not present.

             Supporting start and stop arguments is optional, but
             recommended.
        

Set

A set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__ and __len__.

    To override the comparisons (presumably for speed, as the
    semantics are fixed), redefine __le__ and __ge__,
    then the other operations will automatically follow suit.
    
isdisjoint(self, other)

  Return True if two sets have a null intersection.

Sized

ValuesView