Message415563
| Author |
eryksun |
| Recipients |
asaka, eryksun, paul.moore, steve.dower, tim.golden, zach.ware |
| Date |
2022年03月19日.18:03:11 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1647712991.31.0.259916065491.issue43702@roundup.psfhosted.org> |
| In-reply-to |
| Content |
> which name should be stored if they are duplicated with case insensitive?
Ideally os.environ would preserve the original case of the process environment, and os.environ.copy() would return a copy that's also case insensitive. That would prevent most problems with duplicates keys. See msg387676 in bpo-28824, and msg414319 in bpo-15373.
In msg390038 I suggested keeping the first key that's encountered. However, dicts preserve insertion order nowadays, so one could assume that the last one is the one that the caller wants to keep. |
|