[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread arne123


New submission from arne123 :

I use Python to support some C development.
Often I need to convert bytearrays to C like convention:
0x12, 0x34

It would be very convenient for this use case if the separator could be a 
string (like ", 0x") instead of just a single character.

--
components: IO
messages: 415447
nosy: arne123
priority: normal
severity: normal
status: open
title: allow string as sep in _Py_strhex_impl ( bytearray.hex() )
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue47052>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47052] allow string as sep in _Py_strhex_impl ( bytearray.hex() )

2022-03-17 Thread arne123


arne123  added the comment:

Well, I think there are many ways to solve this in python (e.g. I used 
iteration before, wasn't aware of the sep. at all), but when there is already a 
separator, why limiting it to one character?

--

___
Python tracker 
<https://bugs.python.org/issue47052>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com