Message181777
| Author |
eric.smith |
| Recipients |
eric.smith, janzert, terry.reedy, thomas.scrace |
| Date |
2013年02月10日.01:07:48 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1360458468.38.0.556243511244.issue17174@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think this change should not be made: it's a slippery slope, because there are thousands of places in the stdlib where a similar change could be made.
It's the nature of duck typing that you're not going to get a great error message everywhere you pass in the wrong type. Python programmers just have to learn this and understand it's a source of sometimes unobvious error messages.
If, despite my concerns, this change is still made, I think it is important that any new error message not mention "str", or any list of accepted types. The proposal in msg181762 is good enough: just say that whatever type was used isn't acceptable. For example: there are a number of "path object" proposals floating around, and it's possible one of those could be used with os.path.join despite it not being a str. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年02月10日 01:07:48 | eric.smith | set | recipients:
+ eric.smith, terry.reedy, thomas.scrace, janzert |
| 2013年02月10日 01:07:48 | eric.smith | set | messageid: <1360458468.38.0.556243511244.issue17174@psf.upfronthosting.co.za> |
| 2013年02月10日 01:07:48 | eric.smith | link | issue17174 messages |
| 2013年02月10日 01:07:48 | eric.smith | create |
|