# Document BINARY\_OP\_ opcodes?

**URL:** https://discuss.python.org/t/document-binary-op-opcodes/23884
**Category:** Documentation
**Created:** [February 14, 2023, 5:58pm UTC](https://discuss.python.org/t/document-binary-op-opcodes/23884 "2023-02-14T17:58:27Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![guido](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/guido/32/21_2.png) [@guido](https://discuss.python.org/u/guido)
#### Post date: [February 15, 2023, 1:31am UTC](https://discuss.python.org/t/document-binary-op-opcodes/23884/3 "2023-02-15T01:31:03Z")

</div>

> [@pamelafox](#):
>
> I did find `BINARY_OP_MULTIPLY_FLOAT` in the CPython codebase, but I couldn’t find `BINARY_OP_ADAPTIVE` in the CPython codebase at all, so I presume its name is dynamically concatenated.

Where did you search? In the 3.11 sources, BINARY\_OP\_ADAPTIVE (and many other `_ADAPTIVE`) opcodes exist; in main (to become 3.12) they no longer exist.

All the opcodes you mention are “specialized” opcodes, and will never be seen in the co\_code attribute of code objects when requested from Python code. They are inserted dynamically in Python/specialize.c. The numeric values of these are dynamically calculated in code that is intentionally hard to find (but the values are revealed in Include/opcode.h). You might find a little more background information about this topic in PEP 659 (Specializing Adaptive Interpreter).

Basically, adaptive opcodes are a stepping stone towards specialization. LOAD\_CONST\_\_LOAD\_FAST and friends are “super-instructions” that replace a pair (here, LOAD\_CONST + LOAD\_FAST) but save a little of the dispatch effort.

I’d be reluctant to document any of these, since there’s such a small audience for the documentation, and things are changing quickly in 3.12. I’m curious what led you to find these in the first place?

---

_[View the full topic](https://discuss.python.org/t/document-binary-op-opcodes/23884)._
