lidavidm commented on code in PR #15196:
URL: https://github.com/apache/arrow/pull/15196#discussion_r1112341990


##########
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:
   Sorry, I've been distracted as of late. I can rework the Python parts of 
this so that we have custom Pythonic `__repr__` implementations. I originally 
did the Python changes here just because I figured I'd reduce the duplication 
while I was already rooting around here, but it's be better to give a good 
experience for Python users.



-- 
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]

Reply via email to