exception ExtraError(OSError)#
An OSError of the extension's own: ExtraError(errno, msg) sets .errno / .strerror.
A setu.Class per hook family: what Setu generates for each.
ExtraErrorPlainErrorModeVecLabeledOriginOrderedNumBagBagIterCountdownAdderDynSlotWatchLaterPairSlabraise_extraraise_plainis_plainoverriddenAn OSError of the extension's own: ExtraError(errno, msg) sets .errno / .strerror.
A plain Exception subclass.
Subclass of IntEnum.
How a call ended: an IntEnum (this file's from entry has .enums = .int_enum), every field a member.
A 2D vector with integer coordinates: comparisons, hashing, numbers, pickling.
The squared length.
A new vector of the class cls (a subclass too).
>>> Vec.from_pair(1, 2) Vec(1, 2)
Releases the buffer the last call kept, then keeps buf (a method's py.OwnedWritableBuffer) until the next call and fills it with x; fill_into() only releases. Returns how many bytes.
>>> b = bytearray(2) >>> Vec(7).fill_into(b) 2 >>> b bytearray(b'\x07\x07') >>> b.append(1) BufferError: Existing exports of data: object cannot be re-sized
Subclass of Vec.
A Vec with a label: a Setu subclass, pickled with its base's fields.
The label.
Subclass of Vec.
A Vec with no fields of its own: no instance data of its own (no Py_tp_extra_basicsize).
Is it (0, 0)?
Only __lt__: still hashable (by identity), as a Python class would be.
An integer with every number operator, to check the slots and the reflected ones.
A fixed-size container of up to 4 objects: len, [], in, del, iteration; generic (Bag[int]), with weakrefs and a __dict__.
Iterates a Bag (its own iterator: __next__ without __iter__).
Counts down from start to 1 (__next__ returning ?u64); get_left() is a method (plain_methods), not a property.
How many numbers are left (a method, though it is named like a getter).
Adds base to what it is called with (__call__).
(first + base, rest, extra): a positional-only parameter, then *rest and **extra.
rest |
int |
|
extra |
int |
|
return |
tuple[int, tuple[int, ...], dict[str, int]] |
The number of positional arguments: a method whose first parameter is *args.
args |
int |
|
return |
int |
Dynamic attributes: unknown names read as their length; assignments and deletions are counted (__getattr__, __setattr__, __delattr__).
A descriptor holding one int: read from the class it is itself, from an instance its value; __set__ stores, __delete__ resets to 0.
Calls callback() when finalized (__finalize__), with its fields still set; link makes a reference cycle for the GC to break.
An awaitable (__poll__) that waits once in the event loop, then gives result.
Two ints set in __new__ only (no __init__): the stub declares __new__. The property swapped comes from getset (py.getter), its stub line from stub; repr from slots (a C Py_tp_repr).
b |
int | None |
a when not given |
A large instance whose buffer's default is undefined: tp_new writes only the defined defaults (the shape of Shakti's SQE; tool/bench.py times Slab()).
Raises ExtraError(errno, msg) (raiseWith).
>>> raise_extra(95, 'not here') ExtraError: [Errno 95] not here
Raises PlainError with a formatted message (raise).
>>> raise_plain(3) PlainError: plain 3
Is exc a PlainError (an instance or the class, or a subclass)? (matches)
>>> is_plain(PlainError('x')), is_plain(ValueError()) (True, False)
2 (extra.zig's overridden, which it replaces, gives 1).