New submission from Erik Welch:

The first argument to sorted is positional-only, so the text signature should 
be:

sorted($module, iterable, /, key=None, reverse=False)

instead of

sorted($module, iterable, key=None, reverse=False)

To reproduce the issue, attempt to use "iterable" as a keyword argument:

>>> import inspect
>>> sig = inspect.signature(sorted)
>>> sig.bind(iterable=[])  # should raise, but doesn't
>>> sorted(iterable=[])  # raises TypeError

----------
components: Extension Modules, Library (Lib)
files: sorted_1.diff
keywords: patch
messages: 263145
nosy: eriknw
priority: normal
severity: normal
status: open
title: Incorrect __text_signature__ for sorted
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42422/sorted_1.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26729>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to