comparison tests/test_ini.txt @ 54:f724db086125

houston, we have a pyloader
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 08 Jun 2011 23:29:50 -0700
parents f6616a5f468f
children 6b48dee5b92b
comparison
equal deleted inserted replaced
53:e4a1d7eecd3b 54:f724db086125
30 >>> fib = inifactory.load('fibonacci') 30 >>> fib = inifactory.load('fibonacci')
31 >>> fib(0) == fib(1) == 1 31 >>> fib(0) == fib(1) == 1
32 True 32 True
33 >>> [fib(i) for i in range(5)] 33 >>> [fib(i) for i in range(5)]
34 [1, 1, 2, 3, 5] 34 [1, 1, 2, 3, 5]
35
36 Now let's test a simple wrapper::
37
38 >>> fib = inifactory.load('readable-fibonacci')
39 >>> from pprint import pprint
40 >>> [fib(i) for i in range(5)]
41 ['one', 'one', 'two', 'three', 5]