[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-05-20 Thread Eric Smith

Eric Smith [EMAIL PROTECTED] added the comment:

After discussing this with Talin, we've decided this is works as
designed.  The problem, if any, is that **{' +(': 44} is allowed as a
parameter.  I think that perhaps that should be an error, but I haven't
had time to research if this is already a known issue.

--
resolution:  - rejected
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-05-20 Thread Eric Smith

Eric Smith [EMAIL PROTECTED] added the comment:

I should have been clearer.  By The problem, if any, is that **{' +(':
44} is allowed as a parameter, I meant in general, for all
function/method calls.  It's not an issue that's restricted to str.format().

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-05-06 Thread Eric Smith

Changes by Eric Smith [EMAIL PROTECTED]:


--
assignee:  - eric.smith
nosy: +eric.smith

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-04-12 Thread Bruce Frederiksen

Bruce Frederiksen [EMAIL PROTECTED] added the comment:

I was reading the 3.0 documentation:
http://docs.python.org/dev/3.0/library/string.html#formatstrings which
indicated that an identifier was required.  I was unaware of the
implementation note in the PEP.

They only issue remaining is that for the example in the title of this
issue, { +(}.format(**{' +(': 44}), no error is generated.  I agree
that this is a nit and presumably the will of the community reviewing
the PEP, so agree to having the issue rejected.

I would reject it myself, but am unable to do so...

Thank you for pointing out the PEP to me.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-04-09 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

This is a feature explained in PEP 3101:


Implementation note: The implementation of this proposal is
not required to enforce the rule about a simple or dotted name
being a valid Python identifier.  Instead, it will rely on the
getattr function of the underlying object to throw an exception if
the identifier is not legal.  The str.format() function will have
a minimalist parser which only attempts to figure out when it is
done with an identifier (by finding a '.' or a ']', or '}',
etc.).
 http://www.python.org/dev/peps/pep-3101


Why is that a problem for you?

--
nosy: +belopolsky

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2598] { +(}.format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-04-08 Thread Bruce Frederiksen

New submission from Bruce Frederiksen [EMAIL PROTECTED]:

Format strings are documented to only allow identifiers or integers as
the field_name, but allow almost anything.

Python 3.0a3

--
components: Interpreter Core
messages: 65209
nosy: dangyogi
severity: normal
status: open
title: { +(}.format(**{' +(': 44}) should produce ValueError: invalid 
identifier, ' +(' in format
type: behavior
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2598
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com