Message170340
On Sep 11, 2012, at 04:15 PM, Chris Jerdonek wrote:
>I haven't thought about this very long, but what would happen if the "type"
>conversion is only called on arguments and default arguments that are
>strings, and otherwise left alone?
I thought about that, and actually, my first take on a fix was almost exactly
to restore the isinstance check for str-ness. When I thought about it longer,
it occurred to me that the type conversion for default only made sense when
action was 'store'. Still, either approach would solve the problem.
>It seems like that would at least address the use case in the first comment,
>and maybe the type=open one as well.
>
>Either way, it seems like you still might need to track whether an argument
>has been converted (e.g. if type converts string to another string type).
That would be more complicated, so we'd really have to decide whether to back
port such changes, and whether we can sneak that into 3.3 given how late in
the process we are.
I'd be in favor either of my patch, or restoring the isinstance check
(probably in that order). |
|
Date |
User |
Action |
Args |
2012-09-11 18:45:43 | barry | set | recipients:
+ barry, georg.brandl, bethard, benjamin.peterson, Arfrever, r.david.murray, chris.jerdonek |
2012-09-11 18:45:42 | barry | link | issue15906 messages |
2012-09-11 18:45:42 | barry | create | |
|