Hi,
That is my first post here, I hope it's the right place for it.

so I was using some dicts had the following code:
        env = dict(t for t in os.environ.items() if 'SUBSTRING' not in t[0])

and I thought: It could have really been nice if i could do:
        env = dict(t for t in os.environ.items() if 'SUBSTRING' not in
t.key)

now I see that environ is not exactly a dict, but i think this is useful
for all dictionary types. on the other hand, dicts are everywhere and i'm
not sure about the performance impact of this for those that just ignore
the access by attribute.

of course, a matching t.value must be in place as well. ;)
I would have opened a PR just to try out, but I feel this is so in the core
that I'd first like to hear some comments.
I was searching if anyone else had this idea before but couldn't find
anything.

Thanks,
Nadav
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CCEMPVLWUMDE64UBWCPTXKRLRHLNZB56/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to