From d1d344880b045db8784c7beec081614db2efeaa5 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Thu, 2 Feb 2017 20:24:41 -0800 Subject: [PATCH] Fixes to PEP 263 and PEP 272 (#198) PEP 263: remove extra colon and unnecessary backticks PEP 272: remove extra colon and change back traceback code --- pep-0263.txt | 6 +++--- pep-0272.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pep-0263.txt b/pep-0263.txt index a6a3d8d24..a965a270f 100644 --- a/pep-0263.txt +++ b/pep-0263.txt @@ -67,10 +67,10 @@ or (using formats recognized by popular editors):: or:: #!/usr/bin/python - # vim: set fileencoding= :: + # vim: set fileencoding= : More precisely, the first or second line must match the regular -expression "``^[ \t\v]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)```". +expression "^[ \t\v]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+)". The first group of this expression is then interpreted as encoding name. If the encoding is unknown to Python, an error is raised during compilation. There @@ -80,7 +80,7 @@ is ignored. To aid with platforms such as Windows, which add Unicode BOM marks to the beginning of Unicode files, the UTF-8 signature -'``\xef\xbb\xbf``' will be interpreted as 'utf-8' encoding as well +'\xef\xbb\xbf' will be interpreted as 'utf-8' encoding as well (even if no magic encoding comment is given). If a source file uses both the UTF-8 BOM mark signature and a diff --git a/pep-0272.txt b/pep-0272.txt index 3c0fde61b..caf13b282 100644 --- a/pep-0272.txt +++ b/pep-0272.txt @@ -191,8 +191,8 @@ Here's an example, using a module named 'DES':: >>> len(plaintext) 34 >>> obj.encrypt(plaintext) - Traceback (innermost last):: - File "", line 1, in + Traceback (innermost last): + File "", line 1, in ? ValueError: Strings for DES must be a multiple of 8 in length >>> ciphertext = obj.encrypt(plain+'XXXXXX') # Add padding >>> ciphertext