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 dmaxime
Recipients dmaxime, terry.reedy
Date 2019-12-23.21:11:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1577135514.42.0.144036776783.issue39126@roundup.psfhosted.org>
In-reply-to
Content
>>> b'\xf0\x9f\x98\x86'.decode('utf8')
'😆'
>>> '😆'.encode('utf8')
b'\xf0\x9f\x98\x86'

...now if you write '😆'.encode() then you move the cursor between the brackets and type "'utf8'" you will have this result while the cursor remains in the brackets:

>>> '😆'.encode()''8ftu
SyntaxError: invalid syntax
>>>

I've attached a video that shows this behavior.
Thanks for your attention. Cheers.
History
Date User Action Args
2019-12-23 21:11:54dmaximesetrecipients: + dmaxime, terry.reedy
2019-12-23 21:11:54dmaximesetmessageid: <1577135514.42.0.144036776783.issue39126@roundup.psfhosted.org>
2019-12-23 21:11:54dmaximelinkissue39126 messages
2019-12-23 21:11:54dmaximecreate