This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <>
> 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:57arnausetrecipients: + arnau, bethard, eric.araujo, flying sheep
2011-12-16 02:20:56arnausetmessageid: <>
2011-12-16 02:20:56arnaulinkissue12776 messages
2011-12-16 02:20:55arnaucreate