Discussion:
[FE-discuss] Two problems with RequireIfMissing
Christoph Zwerschke
2009-06-17 21:02:41 UTC
Permalink
I find it a bit confusing that the RequireIf*Missing* docstring is
talking about RequireIf*Present*. Is the latter intended as an alias or
is it deprecated? The docstring should make this more clear.

Also, it seems the _to_python() method of RequireIfMissing is wrongly
referring to "value" instead of "value_dict" in the raise statement.

-- Christoph
Christoph Zwerschke
2010-05-16 04:33:22 UTC
Permalink
Post by Christoph Zwerschke
I find it a bit confusing that the RequireIf*Missing* docstring is
talking about RequireIf*Present*. Is the latter intended as an alias
or is it deprecated? The docstring should make this more clear.
Also, it seems the _to_python() method of RequireIfMissing is
wrongly referring to "value" instead of "value_dict"
I've clarified it in the docstring now. The reason why the bug above
(and a similar one) went unnoticed is that "value" was defined globally
in the module by accident. Fixed here:
http://bitbucket.org/ianb/formencode/changeset/43410f5fdc5c

-- Christoph

Loading...