-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
fixed extra_validators parameter #584
Conversation
40034b4
to
c437564
Compare
c437564
to
8d0f078
Compare
Rebased this to 2.3.x, added a changelog. I copy |
document extra_validators
fcf40a0
to
03b293d
Compare
I am not sure that copy is needed here. I think just having >>> d = {}
>>> def foobar(d=None):
... _d = d or {}
... _d.setdefault("foo", []).append("bar")
... return _d
>>> foobar(d)
{'foo': ['bar']}
>>> foobar(d)
{'foo': ['bar']} However that would have been the case with >>> def foobar(d={}):
... d.setdefault("foo", []).append("bar")
... return d
>>> foobar(d)
{'foo': ['bar']}
>>> foobar(d)
{'foo': ['bar', 'bar']} |
Your first test code doesn't seem to match up, you show it producing a string value instead of a list. |
:) bad copy paste, now the snippet is accurate |
Ah, it's failing because your |
oooK now I see :) |
BaseForm.validate method could take a
extra_validators
parameter, but Form.validate could not.If this is ok I would also like to backport it to branch 2.3.x