edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
369 stars 45 forks source link

Support slicing edgedb.Tuple #325

Closed fmoor closed 2 years ago

fmoor commented 2 years ago

Working towards https://github.com/edgedb/edgedb-python/issues/296

fmoor commented 2 years ago

I have never touched a c extension before :/

1st1 commented 2 years ago

@elprans @fmoor I think we should pause and re-evaluate if we can just use standard Python tuple instead of a custom edgedb.Tuple. We'll still have to have edgedb.NamedTuple fwiw, but I don't see any support of new slicing capabilities added to it. Why?

fmoor commented 2 years ago

We'll still have to have edgedb.NamedTuple fwiw, but I don't see any support of new slicing capabilities added to it. Why?

I had never worked on a C extension before so I was starting small.

1st1 commented 2 years ago

I had never worked on a C extension before so I was starting small.

NP, but since this is now done and looks good, I suggest to generalize the functions into _EdgeGeneric_* family and reuse them from both the namedtuple and tuple (because both types support slicing etc).

1st1 commented 2 years ago

Closing this one -- we got rid of edgedb.Tuple