comparison tests/objects.py @ 58:2a1648a53857

pass values via wrap wrapper
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 08 Jun 2011 23:47:52 -0700
parents cb1898f8c72a
children cc361ad8a692
comparison
equal deleted inserted replaced
57:cb1898f8c72a 58:2a1648a53857
33 values.update(self.values) 33 values.update(self.values)
34 if retval in values: 34 if retval in values:
35 return values[retval] 35 return values[retval]
36 return retval 36 return retval
37 37
38 def wrap(app): 38 def wrap(app, **values):
39 return Wrapper(app) 39 return Wrapper(app, **values)
40 40
41 def fib(n): 41 def fib(n):
42 """return the nth fibonacci term""" 42 """return the nth fibonacci term"""
43 n = int(n) # TODO: should be automagically converted ideally via pyloader 43 n = int(n) # TODO: should be automagically converted ideally via pyloader
44 sequence = [1,1] 44 sequence = [1,1]