1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
From: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8545
Date: Wed, 23 Nov 2022 13:44:54 -0600
Subject: Rename base ByteCode class to _ByteCode
---
numba/core/bytecode.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/numba/core/bytecode.py b/numba/core/bytecode.py
index 410fb4c..5fe02ef 100644
--- a/numba/core/bytecode.py
+++ b/numba/core/bytecode.py
@@ -202,7 +202,7 @@ class ByteCodeIter(object):
return buf
-class ByteCode(object):
+class _ByteCode(object):
"""
The decoded bytecode of a function, and related information.
"""
@@ -307,7 +307,7 @@ class ByteCode(object):
self.co_consts, self.co_names)
-class ByteCodePy311(ByteCode):
+class ByteCodePy311(_ByteCode):
def __init__(self, func_id):
super().__init__(func_id)
@@ -340,6 +340,8 @@ class ByteCodePy311(ByteCode):
if PYVERSION >= (3, 11):
ByteCode = ByteCodePy311
+else:
+ ByteCode = _ByteCode
class FunctionIdentity(serialize.ReduceMixin):
|