jorisvandenbossche commented on code in PR #15196:
URL: https://github.com/apache/arrow/pull/15196#discussion_r1081404786
##########
python/pyarrow/_flight.pyx:
##########
@@ -536,12 +545,7 @@ cdef class FlightDescriptor(_Weakrefable):
return self.descriptor.path
def __repr__(self):
- if self.descriptor_type == DescriptorType.PATH:
- return "<FlightDescriptor path: {!r}>".format(self.path)
- elif self.descriptor_type == DescriptorType.CMD:
- return "<FlightDescriptor command: {!r}>".format(self.command)
- else:
- return "<FlightDescriptor type: {!r}>".format(self.descriptor_type)
+ return frombytes(self.descriptor.ToString())
Review Comment:
I don't know _how_ consistent we want to be on this front, but so in another
recent PR that improved some reprs for Buffer et al objects
(https://github.com/apache/arrow/pull/13921), we did keep the `<...>` around
it.
We could easily do that here as well, but the output of `ToString` already
uses that inside the text repr, so that would give double >>'s ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]