edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

Make `edgedb.Tuple` compatible with `tuple`

Open colinhacks opened this issue 3 years ago • 1 comments

Per https://discord.com/channels/841451783728529451/849374935209607199/943568048504328242

colinhacks avatar Feb 16 '22 19:02 colinhacks

It looks like we are missing at least the following:

t.__add__(other: edgedb.Tuple) -> edgedb.Tuple
t.__mul__(other: int) -> edgedb.Tuple
t.__rmul__(other: int) -> edgedb.Tuple
t.__getitem__(key: slice) -> any
t.index(value: any, start: int = 0, stop: int = 9223372036854775807, /) -> int
t.count(value: any, /) -> int

I'm not sure if these are a good idea or not... Maybe not since it isn't clear what the return type should be.

t.__add__(other: tuple) -> ?
t.__radd__(other: tuple) -> ?

fmoor avatar May 13 '22 21:05 fmoor

Since 1.0 we started to use the built-in tuple type in Python.

fantix avatar May 25 '23 19:05 fantix