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

SourceForge.net noreply at sourceforge.net
Wed Aug 18 04:04:11 CEST 2004


Patches item #1011144, was opened at 2004-08-18 11:04
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
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.


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

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