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 Dionysis.Zindros
Recipients Dionysis.Zindros, docs@python
Date 2015-01-19.13:56:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421675819.3.0.538078693406.issue23271@psf.upfronthosting.co.za>
In-reply-to
Content
In the Unicode HOTWO documentation for Python 2.x [0], there's an error in the fourth code sample under the section "The Unicode Type".

The code states:

```
>>> s = u'Was ever feather so lightly blown to and fro as this multitude?'
>>> s.count('e')
5
>>> s.find('feather')
9
>>> s.find('bird')
-1
>>> s.replace('feather', 'sand')
u'Was ever sand so lightly blown to and fro as this multitude?'
>>> s.upper()
u'WAS EVER FEATHER SO LIGHTLY BLOWN TO AND FRO AS THIS MULTITUDE?'
```

Notice that in the last line, "sand" was turned back into "feather". The correct last line should have been:

```
u'WAS EVER SAND SO LIGHTLY BLOWN TO AND FRO AS THIS MULTITUDE?'
```

[0] https://docs.python.org/2/howto/unicode.html
History
Date User Action Args
2015-01-19 13:56:59Dionysis.Zindrossetrecipients: + Dionysis.Zindros, docs@python
2015-01-19 13:56:59Dionysis.Zindrossetmessageid: <1421675819.3.0.538078693406.issue23271@psf.upfronthosting.co.za>
2015-01-19 13:56:59Dionysis.Zindroslinkissue23271 messages
2015-01-19 13:56:58Dionysis.Zindroscreate