[Python-checkins] python/nondist/peps pep-0292.txt,1.3,1.4
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Sat, 22 Jun 2002 19:20:52 -0700
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv32280
Modified Files:
pep-0292.txt
Log Message:
Bunch of updates (not sure I got them all, the thread was looonggg. ;)
Index: pep-0292.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0292.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pep-0292.txt 20 Jun 2002 03:58:03 -0000 1.3
--- pep-0292.txt 23 Jun 2002 02:20:50 -0000 1.4
***************
*** 37,41 ****
In addition, the rules for what can follow a % sign are fairly
! complex, while the usual application rarely needs such complexity.
--- 37,47 ----
In addition, the rules for what can follow a % sign are fairly
! complex, while the usual application rarely needs such
! complexity. Also error prone is the right-hand side of the %
! operator: e.g. singleton tuples.
!
! Most scripts need to do some string interpolation, but most of
! those use simple `stringification' formats, i.e. %s or %(name)s
! This form should be made simpler and less error prone.
***************
*** 246,249 ****
--- 252,271 ----
are doing simple text processing in some kind of
embedded-Python environment."
+
+ - Should we take a cue from the `make' program and allow $(name)
+ as an alternative (or instead of) ${name}?
+
+ - Should we require a dictionary to the .sub() method? Some
+ people feel that it could be a security risk allowing implicit
+ access to globals/locals, even with the proper admonitions in
+ the documentation. In that case, a new built-in would be
+ necessary (because none of globals(), locals(), or vars() does
+ the right the w.r.t. nested scopes, etc.). Chirstian Tismer
+ has suggested allvars(). Perhaps allvars() should be a method
+ on a frame object (too?)?
+
+ - It has been suggested that using $ at all violates TOOWTDI.
+ Some other suggestions include using the % sign in the
+ following way: %{name}