Note
ppb-vector
follows the semver (semantic versioning) convention. In a nutshell, we commit to forward compatibility within a major version: code that works with version 1.0 ought to work with any 1.x release.
ppb_vector.Vector
x
The X coordinate of the vector
y
The Y coordinate of the vector
(Python 3.10 and up only. See pep636 (PEP 636) for information on pattern matching in general.)
:pyVector
supports not only basic pattern matching (case Vector(x=4, y=2):
), but also supports positional arguments (case Vector(4, 2):
) and also comparison to sequences (case (4, 2):
).
However, it does not support matching against dictionaries (case {'x': 4, 'y': 2}:
).
:pyVector
does not support inheritance.