Message263155
| Author |
martin.panter |
| Recipients |
eriknw, martin.panter, ncoghlan |
| Date |
2016年04月10日.22:46:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1460328419.8.0.0515674732819.issue26729@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is a strange case. It looks like "iterable" is half-supported as a keyword argument. So Silent Ghost’s patch fixes the signature, but the code still tries to accept keyword arguments:
>>> sorted(iterable=None)
TypeError: 'NoneType' object is not iterable
>>> sorted(iterable=())
TypeError: 'iterable' is an invalid keyword argument for this function
The problem is that sorted() blindly passes the keyword arguments to list.sort(). I guess we could delete "iterable" from them, but maybe it is not worth the trouble. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年04月10日 22:46:59 | martin.panter | set | recipients:
+ martin.panter, ncoghlan, eriknw |
| 2016年04月10日 22:46:59 | martin.panter | set | messageid: <1460328419.8.0.0515674732819.issue26729@psf.upfronthosting.co.za> |
| 2016年04月10日 22:46:59 | martin.panter | link | issue26729 messages |
| 2016年04月10日 22:46:59 | martin.panter | create |
|