Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc example doesn't work #231

Closed
tisdall opened this issue Jun 10, 2015 · 1 comment
Closed

doc example doesn't work #231

tisdall opened this issue Jun 10, 2015 · 1 comment

Comments

@tisdall
Copy link
Contributor

tisdall commented Jun 10, 2015

Trying out an example in the docs I get the following:

>>> ranged_int = colander.SchemaNode(
...     schema_type=colander.Int,
...     validator=colander.Range(0, 10),
...     default=10,
...     title='Ranged Int'
...     )
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/colander/__init__.py", line 1817, in __init__
    self.typ = self.schema_type()
  File "/sites/metrics_dev/env/lib/python3.4/site-packages/colander/__init__.py", line 1833, in schema_type
    'Schema node construction without a typ argument or '
NotImplementedError: Schema node construction without a typ argument or a schema_type() callable present on the node class 

related to #229

tisdall added a commit to tisdall/colander that referenced this issue Jul 3, 2015
@mmerickel
Copy link
Member

The doc example is fixed. Sorry but I don't want to add doctests, they're not a pattern I'm comfortable with especially if they don't work with the existing code-block directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants