Andrei Kulakov <andrei....@gmail.com> added the comment:

I think the advantage of asdict() method is it's more discoverable and it 
doesn't leave any uncertainty of whether returned value will update environment 
or not. If a user sees `dict(os.environ)` in code, they may wonder if it does 
or does not; and there's no obvious way to confirm.

If they see os.environ.asdict(), it will be safe to assume that the method is 
provided exactly for this purpose, and the way to confirm is obvious - checking 
the docstring.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue15373>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to