Message149590
| Author |
arnau |
| Recipients |
arnau, bethard, eric.araujo, flying sheep |
| Date |
2011年12月16日.02:20:55 |
| SpamBayes Score |
1.339874e-07 |
| Marked as misclassified |
No |
| Message-id |
<1324002056.87.0.224593364579.issue12776@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|
History
|
|---|
| 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 |
|