STINNER Victor <victor.stin...@haypocalc.com> added the comment: Le vendredi 28 mai 2010 13:30:22, vous avez écrit : > Looking at the implementation again, I found that "y#" rejects > Unicode, while "s#" returns the default encoded version like > "t#" does in Python2.
Oh, I didn't noticed that. > So I have to correct what I said earlier: > > "y#" is not the right replacement for "t#" in order to stay compatible > with its Python2 pendant. The "t#" implementation in Python3 is not > compatible with the Python2 approach - it's in fact, a totally > different parser, since Unicode no longer provides a buffer interface > and thus cannot be used as input for "t#". > > The only compatible pendant to the Python2 "t#" parser marker > in Python3 appears to be "s#". > > I'll have to think about this some more, but seen in that light, > removing "t#" in Python3 may actually be a better strategy after > all - mostly to remove a misguided forward-porting attempt > and to reduce the number of surprising extension writer will > see when porting their apps to Python3. So t#, s# and y# are all different. I'm waiting for your final decision. "reduce the number of surprising extension writer ..." is a good argument in favor of removing t# :-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8839> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com