]> granicus.if.org Git - python/commitdiff
Unicode howto: use .txt as a more universally understood extension for text files.
authorGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 11:07:10 +0000 (13:07 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 11:07:10 +0000 (13:07 +0200)
Doc/howto/unicode.rst

index f19cfc3133153a8858a197079f956f77a91ab89c..486195a6d71fcb4e6c3d0e454e997f43fd683186 100644 (file)
@@ -537,7 +537,7 @@ like those in :meth:`str.encode` and :meth:`bytes.decode`.
 
 Reading Unicode from a file is therefore simple::
 
-    with open('unicode.rst', encoding='utf-8') as f:
+    with open('unicode.txt', encoding='utf-8') as f:
         for line in f:
             print(repr(line))