Message170329
| Author |
chris.jerdonek |
| Recipients |
Arfrever, barry, benjamin.peterson, bethard, chris.jerdonek, georg.brandl |
| Date |
2012年09月11日.17:14:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347383690.1.0.978837240042.issue15906@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is a type of test case that I think should be considered for addition (to confirm that the code doesn't double-convert strings in at least one case). Maybe there is already a test case like this:
class MyString(str): pass
def convert(s):
return MyString("*" + s)
parser = ArgumentParser()
parser.add_argument("--test", dest="test", type=convert, default="foo")
args = parser.parse_args()
print(args.test) |
|