diff options
| author | Juan Catalano <jc@streema.com> | 2013-03-24 22:53:48 -0700 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-04-20 17:18:35 +0200 |
| commit | 78c842a3230f026ad678d243e5459cd6b314d99a (patch) | |
| tree | a4a22465ccc10f4efcc2816d31f2a058d9e82c9c /docs/ref/unicode.txt | |
| parent | 1ddeeb5b8ed5b2cf28302c8aca0a2915a3cfb240 (diff) | |
Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
Diffstat (limited to 'docs/ref/unicode.txt')
| -rw-r--r-- | docs/ref/unicode.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt index bd5bdc96a9..e5074285e4 100644 --- a/docs/ref/unicode.txt +++ b/docs/ref/unicode.txt @@ -47,26 +47,26 @@ You can use Unicode strings, or you can use normal strings (sometimes called .. versionchanged:: 1.5 -In Python 3, the logic is reversed, that is normal strings are Unicode, and -when you want to specifically create a bytestring, you have to prefix the -string with a 'b'. As we are doing in Django code from version 1.5, -we recommend that you import ``unicode_literals`` from the __future__ library -in your code. Then, when you specifically want to create a bytestring literal, -prefix the string with 'b'. + In Python 3, the logic is reversed, that is normal strings are Unicode, and + when you want to specifically create a bytestring, you have to prefix the + string with a 'b'. As we are doing in Django code from version 1.5, + we recommend that you import ``unicode_literals`` from the __future__ library + in your code. Then, when you specifically want to create a bytestring literal, + prefix the string with 'b'. -Python 2 legacy:: + Python 2 legacy:: - my_string = "This is a bytestring" - my_unicode = u"This is an Unicode string" + my_string = "This is a bytestring" + my_unicode = u"This is an Unicode string" -Python 2 with unicode literals or Python 3:: + Python 2 with unicode literals or Python 3:: - from __future__ import unicode_literals + from __future__ import unicode_literals - my_string = b"This is a bytestring" - my_unicode = "This is an Unicode string" + my_string = b"This is a bytestring" + my_unicode = "This is an Unicode string" -See also :doc:`Python 3 compatibility </topics/python3>`. + See also :doc:`Python 3 compatibility </topics/python3>`. .. warning:: |
