Ian Bicking <ianb <at> colorstudy.com> writes:

> 
> Talin wrote:
> >>>Here's a condensed list of the open issues that have been raised by people
> >>>so far:
> >>
> >>I'm not sure whether this was raised explicitly, but Ian at least
> >>mentioned it:  Are they keys to the dictionary in some way restricted?
> >>
> >>For instance, I think it would be reasonable to say that only valid
> >>names (or possibly expressions starting with a valid name) would be
> >>looked up in the dictionary, as a way of explaining why {0} means
> >>position zero, rather than dict['0'].
> > 
> > 
> > Think 'keyword arguments', not 'dict keys'. You can't call a function 
with '0'
> > as a keyword.
> 
> Sure you can, func(**{'0': 'x'}).  Anytime you use ** as a first-class 
> way of passing in a dictionary argument, keywords that are not valid 
> Python identifiers will get passed in, often intentionally.
> 

Well, let me phrase it another way. The question was, what limits should be 
placed on field identifiers, and more specifically, what is the rationale for 
distinguishing between '0' and 'name'? And my answer to this is, that the 
interpretation of field names should be the same as the interpretation of 
keyword arguments by the Python parser.

-- Talin


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to