[Python-3000] Issues with PEP 3101 (string formatting)

Nick Coghlan ncoghlan at gmail.com
Wed Jun 20 16:49:41 CEST 2007


Chris McDonough wrote:
> Wrt http://www.python.org/dev/peps/pep-3101/
> 
> PEP 3101 says Py3K should allow item and attribute access syntax  
> within string templating expressions but "to limit potential security  
> issues", access to underscore prefixed names within attribute/item  
> access expressions will be disallowed.

Personally, I'd be fine with leaving at least the embedded attribute 
access out of the initial implementation of the PEP. I'd even be OK with 
leaving out the embedded item access, but if we leave it in "vars(obj)" 
and the embedded item access would still provide a shorthand notation 
for access to instance variable attributes in a format string.

So +1 for leaving out embedded attribute access from the initial 
implementation of PEP 3101, and -0 for leaving out the embedded item access.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list