-
Notifications
You must be signed in to change notification settings - Fork 145
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
typ
or schema_type
#229
Comments
I think you should also consider my comments in #168 with regards to where to go from here. |
one minor correction: @mmerickel - I'll take a look... I'm not really familiar with the |
I totally agree with this statement... But then a change would break backwards compatibility... I guess it could be done but we'd have to call it colander 2.0. Even the colander docs seem to be abusing this functionality: #231 I think the best that can be done without breaking b.c. in this case is better documentation and perhaps better naming. The fact that an instance has a |
... only issue with the above suggestion is it destroys the symmetry that someone was going for here: http://docs.pylonsproject.org/projects/colander/en/latest/basics.html?highlight=schema_type#subclassing-schemanode However, that example is already broken as passing in |
@mmerickel - Do you have any suggestions for dealing with the above doc example? Should we perhaps allow |
I think colander needs to do a better job of not allowing arbitrary kwargs in |
There appears to be two "type" properties on schemas. It appears that
schema_type
was intended for use with inheritance andtyp
is the keyword argument you pass to the init. However, having two properties that do the same sort of purpose leads to some messy stuff.example:
You can also create a subclass that defines the
schema_type
and then just call the init withtyp
causing the split again.related issue: #150
Is there any reason we can't have one be an alias of the other and just have a single value?
The text was updated successfully, but these errors were encountered: