Browse files

Updating README and setup.py

  • Loading branch information...
1 parent f715cb8 commit 2798e96d5309bd25fbc6a8f63f721790d2d3d843 @rahulkmr rahulkmr committed Nov 30, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 README.md
  2. +3 −3 setup.py
View
4 README.md
@@ -13,9 +13,9 @@ The syntax below should be self explanatory. It can be applied both to bound and
# Constraints on passed arguments.
# Constraints can be callables or regular expressions.
- # Throws a `TypeError` by default if contraints are violated.
+ # Throws a `AugmentError` by default if contraints are violated.
# Optionally, an error handler can be specified which receives the errors.
- @ensure_args(a=lambda x: x > 10,
+ @ensure_args(a=(lambda x: x > 10, 'must be greater than 10'),
b=r'^?-\d+(\.\d+)$',
c=lambda x: x < 5) # `c` will be picked from `kwargs`.
def foo(a, b, **kwargs):
View
6 setup.py
@@ -15,9 +15,9 @@
# Constraints on passed arguments.
# Constraints can be callables or regular expressions.
- # Throws a `TypeError` by default if contraints are violated.
+ # Throws a `AugmentError` by default if contraints are violated.
# Optionally, an error handler can be specified which receives the errors.
- @ensure_args(a=lambda x: x > 10,
+ @ensure_args(a=(lambda x: x > 10, 'must be greater than 10'),
b=r'^?-\d+(\.\d+)$',
c=lambda x: x < 5) # `c` will be picked from `kwargs`.
def foo(a, b, **kwargs):
@@ -136,7 +136,7 @@ def __init__(self):
from setuptools import setup
setup(name='Augment',
- version='0.3',
+ version='0.4',
description='Python decorators for contracts and augmenting OOP.',
long_description=__doc__,
author='Rahul Kumar',

0 comments on commit 2798e96

Please sign in to comment.