[Patches] [ python-Patches-1011144 ] regex nit in encoding declarations

SourceForge.net noreply at sourceforge.net
Wed Aug 18 15:26:41 CEST 2004


Patches item #1011144, was opened at 2004-08-18 04:04
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1011144&group_id=5470

Category: Documentation
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: George Yoshida (quiver)
Assigned to: Nobody/Anonymous (nobody)
Summary: regex nit in encoding declarations

Initial Comment:
This patch is related to bug #995522.

Reference Manual recommends that encoding 
declarations match the pattern
  "coding[=:]\s*([\w-_.]+)"
But this pattern has two problems.

1. - mark needs to be escaped or placed as the first 
character.
   (bug #995522)
2. \w is same as [a-zA-Z0-9_], so there's no need to 
include _ in [].

Then the pattern will become
  coding[=:]\s*([-\w.]+)

The patch is for PEP-0263 and Python Reference Manual.

Thanks.


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2004-08-18 15:26

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as ref2.tex 1.54 and
pep-0263.txt 1.54.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1011144&group_id=5470


More information about the Patches mailing list