This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients eryksun, python-dev, steve.dower, tim.golden, zach.ware
Date 2015-03-25.22:47:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427323629.92.0.879483673563.issue23765@psf.upfronthosting.co.za>
In-reply-to
Content
So the repr that's there for c_char_p is currently::

    "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value)

But if I remove the override then it renders the value as b'abc'. Basically, we can have one of:

>>> from ctypes import *
>>> cast(create_string_buffer(b'abc'), c_char_p)
c_char_p(b'abc')

or

>>> cast(create_string_buffer(b'abc'), c_char_p)
c_char_p(52808208)

I prefer the former (remove c_char_p.__repr__ completely), but the latter is clearly there for some reason. Any opinions?
History
Date User Action Args
2015-03-25 22:47:09steve.dowersetrecipients: + steve.dower, tim.golden, python-dev, zach.ware, eryksun
2015-03-25 22:47:09steve.dowersetmessageid: <1427323629.92.0.879483673563.issue23765@psf.upfronthosting.co.za>
2015-03-25 22:47:09steve.dowerlinkissue23765 messages
2015-03-25 22:47:09steve.dowercreate