Python3 misc bugfixes
douglas.bagnall at catalyst.net.nz
Tue Mar 6 21:05:32 UTC 2018
> I am not sure what you mean, do you mean you wish it to be able to
> handle both str and byte in py3 as input params? If so isn't this just
> trying to subvert what python3 tries to do (however painful it actually
> is) to properly distinguishing bytes and strings.
The counterargument is that the string representation of GUID is
unambiguous and essentially identical whether it is str or bytes, so
why not accept both?
> Additionally this doesn't sound right since the c api that is
> wrapped isÂ GUID_from_data_blob not GUID_from_string.Â While the
> python2 usage of string is handy it isn'tÂ correct (from a python3
Doesn't PyStr_AsUTF8AndSize() handle exactly this?
Without the chance of ambiguity through character sets etc, this seems
a bit like arguing against accepting int when you want float. A little
bit of DWIM will cause less annoyance and no actual problems.
More information about the samba-technical