Latest update.

This commit is contained in:
Barry Warsaw 2004-08-23 03:31:45 +00:00
parent 13a33836fb
commit 0a31599cdf
1 changed files with 15 additions and 8 deletions

View File

@ -7,7 +7,7 @@ Status: Draft
Type: Standards Track Type: Standards Track
Created: 18-Jun-2002 Created: 18-Jun-2002
Python-Version: 2.4 Python-Version: 2.4
Post-History: 18-Jun-2002, 23-Mar-2004 Post-History: 18-Jun-2002, 23-Mar-2004, 22-Aug-2004
Abstract Abstract
@ -161,6 +161,12 @@ Internationalization
run-time. run-time.
Reference Implementation
A SourceForge patch[4] is available which implements this
proposal, include unit tests and documentation changes.
Open Issues Open Issues
- Should the Template and SafeTemplate classes convert mapping - Should the Template and SafeTemplate classes convert mapping
@ -172,7 +178,7 @@ Open Issues
Should this raise an exception such as TypeError, or should this Should this raise an exception such as TypeError, or should this
return the string 'The cose was 7 euros'? return the string 'The cose was 7 euros'?
PEP author preference: no automatic stringification. Proposed resolution: no automatic stringification.
- The pattern for placeholders in the Template and SafeTemplate - The pattern for placeholders in the Template and SafeTemplate
classes matches Python identifiers. Some people want to match classes matches Python identifiers. Some people want to match
@ -185,7 +191,7 @@ Open Issues
the standard library? What about more complex patterns such as the standard library? What about more complex patterns such as
Python expressions? Python expressions?
PEP author preference: No, we don't include them for now. Such Proposed resolution: No, we don't include them for now. Such
classes are easily derived, and besides, we're not proposing to classes are easily derived, and besides, we're not proposing to
include any interpolation mappings, and without such a include any interpolation mappings, and without such a
specialized mapping, a pattern matching attribute paths or specialized mapping, a pattern matching attribute paths or
@ -197,8 +203,8 @@ Open Issues
re-organization of the existing string module, turning it into a re-organization of the existing string module, turning it into a
string package. string package.
PEP author preference: There seems little consensus around Proposed resolution: There seems little consensus around either
either suggestion, and since the classes are just a few lines of suggestion, and since the classes are just a few lines of
Python, I propose no string module re-organization, but to add Python, I propose no string module re-organization, but to add
these two classes to string.py. these two classes to string.py.
@ -208,9 +214,8 @@ Open Issues
was that we add another matching group which matches bare $'s, was that we add another matching group which matches bare $'s,
raising a ValueError if we find such a match. raising a ValueError if we find such a match.
PEP author preference: This sounds fine to me, although because Proposed resolution: There seems to be consensus for strictness
the pattern is part of the public interface for the class, we on the grounds of explicit is better than implicit.
will have to document that 4 groups are expected instead of 3.
References References
@ -224,6 +229,8 @@ References
[3] Guido's python-dev posting from 21-Jul-2002 [3] Guido's python-dev posting from 21-Jul-2002
http://mail.python.org/pipermail/python-dev/2002-July/026397.html http://mail.python.org/pipermail/python-dev/2002-July/026397.html
[4] Reference Implementation
http://sourceforge.net/tracker/index.php?func=detail&aid=1014055&group_id=5470&atid=305470
Copyright Copyright