Metode ini mengubah nama opsi pada setiap operasi baca, dapatkan, atau setel. Defaultnya mengubah nama menjadi huruf kecil. Ini juga berarti bahwa ketika file konfigurasi ditulis, semua kunci akan menggunakan huruf kecil. Ganti metode ini jika tidak sesuai. Misalnya:
ConfigParser.optionxform(option)
>>> config = """
... [Section1]
... Key = Value
...
... [Section2]
... AnotherKey = Value
... """
>>> typical = configparser.ConfigParser()
>>> typical.read_string(config)
>>> list(typical['Section1'].keys())
['key']
>>> list(typical['Section2'].keys())
['anotherkey']
>>> custom = configparser.RawConfigParser()
>>> custom.optionxform = lambda option: option
>>> custom.read_string(config)
>>> list(custom['Section1'].keys())
['Key']
>>> list(custom['Section2'].keys())
['AnotherKey']