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 vstinner
Recipients lemburg, vstinner
Date 2010-05-28.11:04:00
SpamBayes Score 0.014171402
Marked as misclassified No
Message-id <1275044642.5.0.15082943935.issue8839@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2010-05-28 11:04:02vstinnersetrecipients: + vstinner, lemburg
2010-05-28 11:04:02vstinnersetmessageid: <1275044642.5.0.15082943935.issue8839@psf.upfronthosting.co.za>
2010-05-28 11:04:00vstinnerlinkissue8839 messages
2010-05-28 11:04:00vstinnercreate