GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)

[Python-Dev] PEP 540: Add a new UTF-8 mode (v2)

Glenn Linderman v+python at g.nevcal.com
Thu Dec 7 20:49:43 EST 2017

  • Previous message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • Next message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On 12/7/2017 5:45 PM, Jonathan Goble wrote:
> On Thu, Dec 7, 2017 at 8:38 PM Glenn Linderman <v+python at g.nevcal.com 
> <mailto:v%2Bpython at g.nevcal.com>> wrote:
>
>     If it were to be changed, one could add a text-mode option in 3.7,
>     say "t" in the mode string, and a PendingDeprecationWarning for
>     open calls without the specification of either t or b in the mode
>     string.
>
>
> "t" is already supported in open()'s mode argument [1] as a way to 
> explicitly request text mode, though it's essentially ignored right 
> now since text is the default anyway. So since the option is already 
> present, the only thing needed at this stage for your plan would be to 
> begin deprecating not using it.
>
> *goes back to lurking*
>
> [1] https://docs.python.org/3/library/functions.html#open

Thanks for briefly de-lurking.

So then for PEP 540... use surrogateescape immediately for t mode.

Then, when the user encounters an encoding error, there would be three 
solutions: switch to t mode, explicitly switch to surrogateescape, or 
fix the locale.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171207/8bf180f3/attachment.html>

  • Previous message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • Next message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.