JelleZijlstra · GitHub

Feature or enhancement

Proposal:

dis output does not show which IS_OP is being used (0 = is, 1 = is not):

>>> dis.dis("a is b")
  0           RESUME                   0
  1           LOAD_NAME                0 (a)
              LOAD_NAME                1 (b)
              IS_OP                    0
              RETURN_VALUE
>>> dis.dis("a is not b")
  0           RESUME                   0
  1           LOAD_NAME                0 (a)
              LOAD_NAME                1 (b)
              IS_OP                    1
              RETURN_VALUE

For comparison:

>>> dis.dis("a > b")
  0           RESUME                   0
  1           LOAD_NAME                0 (a)
              LOAD_NAME                1 (b)
              COMPARE_OP             132 (>)
              RETURN_VALUE

(Not planning to work on this myself.)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Read the original on github.com ↗