[Python-ideas] Proposal for special name and qualname symbols
Barry Scott
barry at barrys-emacs.org
Sat Jun 11 12:00:42 EDT 2016
What is the behavour in this case:
mydict[ index ] = Record( __LHS__ )
I expect ther are others to consider like +=.
I suspose if there is reasonable semantics raise SyntaxError?
Barry
Barry
> On 8 Jun 2016, at 22:10, Barry Warsaw <barry at python.org> wrote:
>
>> On Jun 08, 2016, at 12:43 PM, Nikolaus Rath wrote:
>>
>> This is so similar (in both semantics and syntax) to the
>>
>> Record = namedtuple($lhs, fields)
>>
>> proposal that I've made several times in that thread that I am a little
>> offended. Either you've not read that thread all that thorougly, or you
>> have a rather selective memory.
>
> It's of course quite easy to miss a specific suggestion in the various
> millithreads on this list, or not quite connect the dots to see the
> similarities on the initial read. Just be happy that great minds think
> alike. :)
>
> On to the topic at hand, when I saw your suggestion and Steve's I immediately
> thought I'd like to see a special symbol like __LHS__, e.g.
>
> Record = namedtuple(__LHS__, fields)
>
> which would at least have the benefit of not introducing a special character,
> and one that could be confusing in other contexts (e.g. PEP 292 strings).
>
> Cheers,
> -Barry
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
More information about the Python-ideas
mailing list