On 9 April 2018 at 22:10, Brett Cannon <br...@python.org> wrote:
>
>
> On Mon, 9 Apr 2018 at 05:18 Joao S. O. Bueno <jsbu...@python.org.br> wrote:
>>

>> we could even call this approach a name such as "function call".
>
>
> The harsh sarcasm is not really called for.

Indeed - on rereading, I have to agree on that.

I do apologize for the sarcasm. - really, I not only stand corrected:
I recognize i was incorrect to start with.

But my argument that this feature is needless language bloat stands.

On the othe hand, as for getting variable names out of _shallow_  mappings,
I've built that feature in a package I authored, using a context manager
to abuse the import mechanism -

In [96]: from extradict import MapGetter

In [97]: data = {"A": None, "B": 10}

In [98]: with MapGetter(data):
   ...:     from data import A, B
   ...:

In [99]: A, B
Out[99]: (None, 10)


That is on Pypi and can be used by anyone right now.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to