This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients belopolsky, benjamin.peterson, docs@python, eric.araujo, eric.smith, mark.dickinson, terry.reedy
Date 2010-10-08.22:55:18
SpamBayes Score 5.318329e-08
Marked as misclassified No
Message-id <1286578520.62.0.554078688413.issue10021@psf.upfronthosting.co.za>
In-reply-to
Content
This is a bug report in that there is a discrepancy between the grammar in the doc and the behavior. Laxiness can lead to portability problems if CPython is lax compared to a normal reading of the spec and another implementation takes the spec seriously.

I agree that implementation details that lead to an exception here and not there, or vice versa, are best avoided.

For getattr:
'''
getattr(object, name[, default]) 
Return the value of the named attributed of object. name must be a string.
'''
the doc is careful to just say that name must be a string, not specifically an identifier. Given that, I suppose
"attribute_name    ::=  identifier" should be changed to match so that string formats can always (all implementations) also access non-identifier attributes.
History
Date User Action Args
2010-10-08 22:55:20terry.reedysetrecipients: + terry.reedy, mark.dickinson, belopolsky, eric.smith, benjamin.peterson, eric.araujo, docs@python
2010-10-08 22:55:20terry.reedysetmessageid: <1286578520.62.0.554078688413.issue10021@psf.upfronthosting.co.za>
2010-10-08 22:55:18terry.reedylinkissue10021 messages
2010-10-08 22:55:18terry.reedycreate