Le mer. 15 avr. 2020 à 23:38, Glenn Linderman a écrit :
> Do the child objects truly need to be wrapped, or just accessed?
>
> Thanks for your comments though, they inspired a thought.
>
> The problem with the glom syntax versus the dotted syntax is that the
> minimal syntax is bulky.
>
> obj.abc.def.ghi versus glom( obj, 'abc.def.ghi')
>
> The problem with attribute syntax is the conflict with regular
> attributes, and the limitation of valid identifier characters. Glom
> probably doesn't have these problems.
>
> So my new thought is that we need a new syntax. The minimal existing
> syntax might be
>
> obj._('abc.def.ghi') or maybe obj['abc.def.ghi']
>
> although the latter would conflict with regular dict lookups, but obj
> isn't a regular dict, so that might not matter.
Such discussion is better fitted for python-ideas mailing list.
Victor
--
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/5D77F3PUNXDP5FCSMQQA4RDPKVVNDFAD/
Code of Conduct: http://python.org/psf/codeofconduct/