Message149590
> Could you add a test to verify that custom actions are still getting
> the converted values passed to their __call__? I suspect this may not
> be happening under the current patch - if that's the case, you may
> also need to add conversions in _get_values, where the lines look like
> "value = action.default".
There seems to be already a test for that, namely TestActionUserDefined,
which use type=float and type=int. The value is properly converted to
{int,float} when passed to __call__(). Just in case, I also tested with
a 'type' function I defined myself (which only returns float()) for
OptionalAction and it's working fine.
> Also, "action.default == getattr(namespace, action.dest)" should
> probably use "is" instead of "==".
Good point, it would be much better. Thanks for the advice. I have just
modified the patch with that. |
|
Date |
User |
Action |
Args |
2011-12-16 02:20:57 | arnau | set | recipients:
+ arnau, bethard, eric.araujo, flying sheep |
2011-12-16 02:20:56 | arnau | set | messageid: <1324002056.87.0.224593364579.issue12776@psf.upfronthosting.co.za> |
2011-12-16 02:20:56 | arnau | link | issue12776 messages |
2011-12-16 02:20:55 | arnau | create | |
|