Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepwalker committed Mar 25, 2012
1 parent a35cc14 commit e41ca40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -10,7 +10,7 @@ def read(fname):

setupconf = dict(
name = 'trafaret',
version = '0.3.9',
version = '0.3.91',
license = 'BSD',
url = 'https://github.com/Deepwalker/trafaret/',
author = 'Barbuza, Deepwalker',
Expand Down
10 changes: 9 additions & 1 deletion trafaret/__init__.py
Expand Up @@ -95,6 +95,14 @@ class Trafaret(object):
"""
Base class for trafarets, provides only one method for
trafaret validation failure reporting
Check that converters can be stacked
>>> (Int() >> (lambda x: x * 2) >> (lambda x: x * 3)).check(1)
6
Check order
>>> (Int() >> float >> str).check(4)
'4.0'
"""

__metaclass__ = TrafaretMeta
Expand All @@ -121,7 +129,7 @@ def converter(self, value):
def _convert(self, value):
val = value
for converter in getattr(self, 'converters', [self.converter]):
val = converter(value)
val = converter(val)
return val

def _failure(self, error=None):
Expand Down

0 comments on commit e41ca40

Please sign in to comment.