07.03.19 11:18, Inada Naoki пише:
So what should we do about optionxform?

a)  Document "optionxform must be idempotent".

b) Ensure all APIs calls optionxform exactly once, and document
    "When you get option name from section objects, it is already
     optionxform-ed.  You can not reuse the option name if
     optionxform is not idempotent, because optionxform will be
     applied to the name again."

I prefer (a) to (b) because it's simple and easy solution.

I am not expert of configparser, but I prefer (a). The purpose of introducing optionxform was to make lowercasing optional.

https://github.com/python/cpython/commit/9e480adf9b3520ea3deb322fd1214f53a2293a0d

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to