This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: configparser hate dot in option like eth2.6
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Yavuz Selim Komur, lukasz.langa, r.david.murray, skip.montanaro, zach.ware
Priority: normal Keywords:

Created on 2015-06-03 07:34 by Yavuz Selim Komur, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (6)
msg244730 - (view) Author: Yavuz Selim Komur (Yavuz Selim Komur) Date: 2015-06-03 07:34
[remember]
eth2.6 = True
eth5 = True



eth5 correct but eth2.6 return exception
msg244741 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2015-06-03 12:54
What little I could find about Windows INI file syntax didn't identify the valid character set of the keys. Like other Windows-based file formats, INI seems to only be operationally defined. It wouldn't surprise me if you needed to restrict yourself to the usual identifier syntax. In regular expression terms:

    [_A-Za-z][a-zA-Z_0-9]*
msg244763 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-06-03 15:31
I'm guessing python3 would also handle unicode identifiers, but I haven't checked.  That said, there's no reason configparser couldn't handle any key that doesn't have a '#', ';', ':' or '=' in it, in theory.  Whether we *want* to do that or not is a different question, and would lead to the question of what the correct normalization would be for keys.
msg244854 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-06-05 03:57
Am I missing something here?

Python 3.6.0a0 (default:c2c3b79ba992, Jun  4 2015, 10:24:23)
>>> from configparser import ConfigParser
>>> cp = ConfigParser()
>>> cp.read_string("""\
... [remember]
... eth2.6 = True
... eth5 = True
... """)
>>> cp['remember']['eth2.6']
'True'
msg244855 - (view) Author: Yavuz Selim Komur (Yavuz Selim Komur) Date: 2015-06-05 06:52
I'm sorry, my fault.

bond1.999  vs bond1.199  
my mistake..
I'm in a big shame :(

[remember]
# Her bir interface icin Beni hatirla uygulamasi etkinlestirme
# default: False
bond1.999 = True
bond1.778 = False

[timeout]
# Saniye cinsinden inactive session bulma suresi
# her bir interface icin ayri ayri yazilacak.
# default: -1
bond1.199 = 120
bond1.778 = -1
msg244856 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-06-05 07:00
Ahhh, bitten by a typo? :)
History
Date User Action Args
2022-04-11 14:58:17adminsetgithub: 68559
2015-06-05 07:00:27zach.waresetstatus: open -> closed

components: - Extension Modules
versions: + Python 3.3, Python 3.4, - Python 3.6
messages: + msg244856
type: enhancement -> behavior
resolution: not a bug
stage: resolved
2015-06-05 06:52:20Yavuz Selim Komursetmessages: + msg244855
2015-06-05 03:57:58zach.waresetnosy: + zach.ware
messages: + msg244854
2015-06-03 15:31:11r.david.murraysetversions: + Python 3.6, - Python 3.3, Python 3.4
nosy: + r.david.murray, lukasz.langa

messages: + msg244763

type: enhancement
2015-06-03 12:54:18skip.montanarosetnosy: + skip.montanaro
messages: + msg244741
2015-06-03 07:34:28Yavuz Selim Komurcreate