[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: removing 'experimental' notice from pygame.math



> Single scalar constructor should Vector2(1) == Vector2(1, 1)

This is the kind of situation where I'd follow PEP20: "In the face of ambiguity, refuse the temptation to guess." There's an obvious pitfall if you expected to pass a tuple and you instead pass a scalar or the wrong length tuple - it silently succeeds but constructs the wrong Vector. Perhaps raise a TypeError?

> Lower dimensional to higher dimension contructors should work:
> Vector3(1, Vector2(2, 3)) == Vector3(1, 2, 3)

We don't need this because we have star args:

Vector3(1, *Vector2(2, 3))