Message106644
> Given that "y#" is not (yet) in wide-spread use, ...
t# is only used once (in codecs.charbuffer_encode()), whereas y# is used by ossaudiodev, socket and mmap modules (there are 8 functions using y#). There are 46 functions using y* format. y format is not used in Python3.
To me, it looks easier to just drop t# and continue to use y, y* and y# formats in Python3.
> "y#" and "y*" could then be setup as synonyms for "t#" and "t*"
If we have to keep backward compatibility, yes, t# can be kept as a synonym for y#. But I don't think that backward compatibility of the C API is important in Python3 because only few 3rd party modules are compatible with Python3.
--
I prefer to use y, y* and y# formats because they target the *bytes* type (which is the Python3 type to store byte strings), whereas s# is used in Python2 to get text, *str* type.. which are byte strings, but most Python2 programmers consider that the str type is the type of chararacter string. I see the change of s# to y#, as the change from str to bytes (the strict separation between bytes and str). |
|
Date |
User |
Action |
Args |
2010-05-28 11:04:02 | vstinner | set | recipients:
+ vstinner, lemburg |
2010-05-28 11:04:02 | vstinner | set | messageid: <1275044642.5.0.15082943935.issue8839@psf.upfronthosting.co.za> |
2010-05-28 11:04:00 | vstinner | link | issue8839 messages |
2010-05-28 11:04:00 | vstinner | create | |
|