PointNamedTuple
PointNamedTuple is a named tuple type used to represent a point in two-dimensional space. It provides a lightweight, immutable data container with two coordinates, typically labeled x and y.
In Python, PointNamedTuple can be defined using the typing.NamedTuple approach or the older namedtuple factory. For
PointNamedTuple fields are accessed by dot notation, such as p.x and p.y. Instances are tuple-like and immutable,
PointNamedTuple is suitable for simple geometric data, graphics coordinates, or any scenario where a small, fixed
Advantages include concise syntax, clear field names, immutability, and compatibility with type checking. Limitations include fixed
PointNamedTuple relates to Python’s collections.namedtuple and dataclass approaches. It is a lightweight alternative when a simple,