[Python-ideas] Proposal for special name and qualname symbols

Barry Warsaw barry at python.org
Wed Jun 8 17:10:16 EDT 2016


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160608/2bf258fd/attachment.sig>


More information about the Python-ideas mailing list