Why is there no natural syntax for accessing attributes with names not being valid identifiers?

Ethan Furman ethan at stoneleaf.us
Thu Dec 5 01:26:20 CET 2013


On 12/04/2013 03:57 PM, Piotr Dobrogost wrote:
> On Thursday, December 5, 2013 12:09:52 AM UTC+1, Ethan Furman wrote:
>>
>> Perhaps you should look at different ways of spelling your identifiers?
>>  Why can't you use an underscore instead of a hyphen?
>
> So that underscore could be left for use inside fields' names?
> However I think we could use some unique Unicode character for this
>  instead hyphen as long as Python allows any alphanumeric Unicode
>  character inside identifiers which I think it does...

Yes, although I don't remember at which version that became true...

--
~Ethan~



More information about the Python-list mailing list