Commits

holger krekel committed f91c4d5

add proxy lineof function

Comments (0)

Files changed (2)

 """ brain-dead simple parser for ini-style files.
 (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed
 """
-__version__ = "0.2.dev0"
+__version__ = "0.2.dev2"
 
 __all__ = ['IniConfig', 'ParseError']
 
         self.config = config
         self.name = name
 
+    def lineof(self, name):
+        return self.config.lineof(self.name, name)
+
     def get(self, key, default=None, convert=str):
         return self.config.get(self.name, key, convert=convert, default=default)
 

test_iniconfig.py

     assert config.lineof('section2') == 3
     assert config.lineof('section', 'value') == 2
     assert config.lineof('section2','value') == 5
+    
+    assert config['section'].lineof('value') == 2
+    assert config['section2'].lineof('value') == 5
 
 def test_iniconfig_get_convert():
     config= IniConfig("x", data='[section]\nint = 1\nfloat = 1.1')