Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.079 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; '(instead': 0.07; 'seemed': 0.07; 'conf': 0.09; 'parsing': 0.09; 'anymore.': 0.16; "shouldn't": 0.23; 'import': 0.27; 'example': 0.29; 'worked': 0.29; 'message-id:@gmail.com': 0.31; 'actually': 0.31; "can't": 0.33; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.35; 'received:209.85.214': 0.36; 'to:name:python-list': 0.37; 'received:10.0.0': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.37; 'received:209.85': 0.38; 'fail': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'type': 0.61; 'simple': 0.61; 'validation': 0.73; '10)': 0.84; 'ps.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=aqImc8NuE5wK1X6Gz9gCCwFG8qzmkyiGLTOg+m9TDU4=; b=xsmnyrLchripcgVeSgOXEBAzATeggSh+Y+tgrI/nVUQxkMAeP9+EIbyZwQ3u8dC0oA +qZXD3Yze25EvekwJ0Fxgzyx7XUFALZYSv1DWLY2hpvK99u1o122t92XYFo0N/iKedh1 Zg793Ri6eZvRJvZ3pFNA88qsNdRk4fqfSgGBKC+9RGdVztkYWA3xKAnCuP1oqCPDQ0iD h/7pZAwcK+Sp2p0WvBQQeBCTQdWCZu3D1cdg1lzo8skCrPqUfwq30e8mzTXU9MDGLB0W E4VHUuyZEiHe6rN4hJpUwMzMW96+9DjkOtN3XcVtZuvQl7IoxwLTEJcOPNKqwPy7Cq37 khdg== Date: Mon, 19 Mar 2012 12:59:43 +0000 From: Andrea Crotti User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120217 Thunderbird/10.0.2 MIME-Version: 1.0 To: python-list Subject: configobj validation Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1332161987 news.xs4all.nl 6851 [2001:888:2000:d::a6]:51420 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21894 I seemed to remember that type validation and type conversion worked out of the box, but now I can't get it working anymore. Shouldn't this simple example actually fail the parsing (instead it parses perfectly port to a string)? sample.py: from configobj import ConfigObj conf = ConfigObj('sample.conf', configspec='sample.spec') sample.conf: port = some_string sample.spec: port = integer(0, 10) PS. using configobj 4.7.2