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.

classification
Title: Missing signatures operator module
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.5
process
Status: open Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Frederik Rietdijk, iritkatriel, martin.panter
Priority: normal Keywords:

Created on 2016-01-06 13:07 by Frederik Rietdijk, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg257606 - (view) Author: Frederik Rietdijk (Frederik Rietdijk) Date: 2016-01-06 13:07
The operator module has no signatures for (most) of the functions defined in it.


Use case:
The multipledispatch module uses inspect.getfullargspec and therefore the functions in operator cannot be used in combination with the @dispatch decorator
msg257637 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-01-06 20:34
Perhaps the patch in Issue 20186 (Argument Clinic conversion including the module) will help. I noticed there was some concern about reduced performance; I’m not sure if that is still a problem or not.
msg416571 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-04-02 17:40
I think this was fixed by now, this is an excerpt from help(operator):


    lshift(a, b, /)
        Same as a << b.

    lt(a, b, /)
        Same as a < b.

    matmul(a, b, /)
        Same as a @ b.

    mod(a, b, /)
        Same as a % b.

    mul(a, b, /)
        Same as a * b.

    ne(a, b, /)
        Same as a != b.

    neg(a, /)
        Same as -a.

    not_(a, /)
        Same as not a.

    or_(a, b, /)
        Same as a | b.

    pos(a, /)
        Same as +a.

    pow(a, b, /)
        Same as a ** b.

    rshift(a, b, /)
        Same as a >> b.
History
Date User Action Args
2022-04-11 14:58:25adminsetstatus: pending -> open
github: 70211
2022-04-02 17:40:03iritkatrielsetstatus: open -> pending

nosy: + iritkatriel
messages: + msg416571

resolution: out of date
2016-01-06 20:34:38martin.pantersetnosy: + martin.panter
messages: + msg257637
2016-01-06 13:07:55Frederik Rietdijkcreate