homepage

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 eriknw
Recipients eriknw, martin.panter, ncoghlan, rhettinger, serhiy.storchaka
Date 2016年04月12日.13:16:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460466977.97.0.632136227675.issue26729@psf.upfronthosting.co.za>
In-reply-to
Content
sorted_3.patch corrects the __text_signature__. Behavior of sorted is unchanged.
>>> def raises(err, lamda):
... try:
... lamda()
... return False
... except err:
... return True
...
>>> import inspect
>>> sig = inspect.signature(sorted) 
>>> # `iterable` is positional-only
>>> assert raises(TypeError, lambda: sorted(iterable=[]))
>>> assert raises(TypeError, lambda: sig.bind(iterable=[]))
>>> # `key` and `reverse` are keyword-only
>>> assert raises(TypeError, lambda: sorted([], lambda x: x))
>>> assert raises(TypeError, lambda: sig.bind([], lambda x: x))
History
Date User Action Args
2016年04月12日 13:16:18eriknwsetrecipients: + eriknw, rhettinger, ncoghlan, martin.panter, serhiy.storchaka
2016年04月12日 13:16:17eriknwsetmessageid: <1460466977.97.0.632136227675.issue26729@psf.upfronthosting.co.za>
2016年04月12日 13:16:17eriknwlinkissue26729 messages
2016年04月12日 13:16:17eriknwcreate

AltStyle によって変換されたページ (->オリジナル) /