[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Martin Panter

Martin Panter added the comment:

Thanks for the report Quentin.

--
nosy: +martin.panter
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 63c1c7cdad0f by Martin Panter in branch '3.5':
Issue #26220: Remove outdated comment about a question mark
https://hg.python.org/cpython/rev/63c1c7cdad0f

New changeset dbf90175ea50 by Martin Panter in branch 'default':
Issue #26220: Merge Unicode how-to from 3.5
https://hg.python.org/cpython/rev/dbf90175ea50

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26220] Unicode HOWTO references a question mark that isn't in snippet

2016-01-27 Thread Quentin Pradet

New submission from Quentin Pradet:

>From https://docs.python.org/3.6/howto/unicode.html#the-string-type:

> The following examples show the differences::
>
> >>> b'\x80abc'.decode("utf-8", "strict")  #doctest: +NORMALIZE_WHITESPACE
> Traceback (most recent call last):
> ...
> UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0:
>   invalid start byte
> >>> b'\x80abc'.decode("utf-8", "replace")
> '\ufffdabc'
> >>> b'\x80abc'.decode("utf-8", "backslashreplace")
> '\\x80abc'
> >>> b'\x80abc'.decode("utf-8", "ignore")
> 'abc'
>
> (In this code example, the Unicode replacement character has been replaced by
> a question mark because it may not be displayed on some systems.)

I think the whole sentence after the snippet can be removed because this is 
exactly what Python 3.2+ outputs. It looks like the commit which added this 
sentence dates from Python 3.1: 
https://github.com/python/cpython/commit/34d4c82af56ebc1b65514a118f0ec7feeb8e172f,
 but another commit around Python 3.3 removed it: 
https://github.com/python/cpython/commit/63172c46706ae9b2a3bc80d639504a57fff4e716.

--
assignee: docs@python
components: Documentation
messages: 259034
nosy: Quentin.Pradet, docs@python
priority: normal
severity: normal
status: open
title: Unicode HOWTO references a question mark that isn't in snippet
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com