Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spelling': 0.09; 'subject:Why': 0.09; 'underscore': 0.09; 'python': 0.11; 'identifiers': 0.16; 'names?': 0.16; 'piotr': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:accessing': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'typing': 0.19; 'header:User-Agent:1': 0.23; 'received:comcast.net': 0.24; 'unicode': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'allows': 0.31; 'could': 0.34; 'subject:with': 0.35; "can't": 0.35; 'december': 0.35; 'but': 0.35; 'subject:?': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'different': 0.65; 'alphanumeric': 0.68; 'subject:there': 0.68; 'unusual': 0.74; 'ethan': 0.84; 'furman': 0.84; 'subject:being': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers? Date: Wed, 04 Dec 2013 20:17:45 -0500 References: <15912943-29a1-4365-b027-7bb8cec447f8@googlegroups.com> <3a27ef53-64b7-4cf3-9879-8452fab458a1@googlegroups.com> <5d99a76c-35eb-4c1d-bdb5-e4e1f6bea188@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: c-50-133-228-126.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <5d99a76c-35eb-4c1d-bdb5-e4e1f6bea188@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386206281 news.xs4all.nl 2859 [2001:888:2000:d::a6]:57480 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61067 On 12/4/13 6: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... > > Regards, > Piotr > You object to typing [''] but you don't mind typing an unusual Unicode character? --Ned.