bool-hybrid-array 9.10.16__tar.gz → 9.10.17__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bool-hybrid-array
3
- Version: 9.10.16
3
+ Version: 9.10.17
4
4
  Summary: 一个高效的布尔数组(密集+稀疏混合存储,节省内存)
5
5
  Home-page: https://github.com/BKsell/bool-hybrid-array
6
6
  Author: 蔡靖杰
@@ -562,6 +562,7 @@ except OverflowError as e:
562
562
  * **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
563
563
  * **9.10.15**:修复IntHybridArray变成布尔数组的错误
564
564
  * **9.10.16**:新增Python 3.14时的jit优化加速
565
+ * **9.10.17**:给保护字典添加__import__方法,支持from导入
565
566
 
566
567
 
567
568
 
@@ -522,6 +522,7 @@ except OverflowError as e:
522
522
  * **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
523
523
  * **9.10.15**:修复IntHybridArray变成布尔数组的错误
524
524
  * **9.10.16**:新增Python 3.14时的jit优化加速
525
+ * **9.10.17**:给保护字典添加__import__方法,支持from导入
525
526
 
526
527
 
527
528
 
@@ -3,7 +3,7 @@ from types import ModuleType,FunctionType
3
3
  from . import core
4
4
  from .core import __builtins__,builtins
5
5
  from . import int_array
6
- __version__ = "9.10.16"
6
+ __version__ = "9.10.17"
7
7
  public_objects = []
8
8
  def jit_class_methods(cls):
9
9
  for attr_name in dir(cls):
@@ -756,6 +756,15 @@ class ProtectedBuiltinsDict(dict,metaclass=ResurrectMeta):
756
756
  raise AttributeError(f'禁止修改内置常量:{self.name}.{name}')
757
757
  else:
758
758
  super().__setattr__(name,value)
759
+ def __import__(self, name, globals=None, locals=None, fromlist=(), level=0):
760
+ if fromlist:
761
+ result = []
762
+ for key in fromlist:
763
+ if key not in self:
764
+ raise AttributeError(f"'ImportableDict' object has no attribute '{key}'")
765
+ result.append(self[key])
766
+ return result[0] if len(result) == 1 else tuple(result)
767
+ return self
759
768
  def Ask_arr(arr):
760
769
  if isinstance(arr,BHA_List):
761
770
  return '\n'.join(map(Ask_arr,arr))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bool-hybrid-array
3
- Version: 9.10.16
3
+ Version: 9.10.17
4
4
  Summary: 一个高效的布尔数组(密集+稀疏混合存储,节省内存)
5
5
  Home-page: https://github.com/BKsell/bool-hybrid-array
6
6
  Author: 蔡靖杰
@@ -562,6 +562,7 @@ except OverflowError as e:
562
562
  * **9.10.14**:修复IntHybridArray中因单个 0 导致所有数字位长被压缩到 1的问题
563
563
  * **9.10.15**:修复IntHybridArray变成布尔数组的错误
564
564
  * **9.10.16**:新增Python 3.14时的jit优化加速
565
+ * **9.10.17**:给保护字典添加__import__方法,支持from导入
565
566
 
566
567
 
567
568
 
@@ -8,7 +8,7 @@ def get_long_description():
8
8
  return "一个高效的布尔数组(密集+稀疏混合存储,节省内存)"
9
9
  setup(
10
10
  name="bool-hybrid-array",
11
- version="9.10.16",
11
+ version="9.10.17",
12
12
  author="蔡靖杰",
13
13
  extras_require={"int_array":[]},
14
14
  author_email="1289270215@qq.com",