0
Follow
0
Followers
Tôi có thể tham chiếu đến một thư viện mẫu khác trong thư viện mẫu không?
Created 2025-09-05 17:05:13
3
395
Ví dụ, tôi có hai thư viện mẫu:
Thư viện mẫu T1
class T1:
def __init__(self):
pass
ext.T1 = T1
Thư viện mẫu T2:
class T2(ext.T1):
def __init__(self):
pass
ext.T2 = T2
Tôi đã chọn hai thư viện mẫu khi tôi sử dụng nó, nhưng nó luôn luôn sai.<module> AttributeError: 'Ooo' object has no attribute 'T1'
Có phải hệ thống không hỗ trợ các thư viện template gọi nhau hay là tôi có vấn đề về cách viết không?
Related Recommendations
Inventor Quant Workflow FAQ (Continuously Updated)Financial Magic Zone Global KOL RecruitmentFAQ Summary (Updating...)PINE Language Introductory Tutorial of FMZ QuantPrimary Tutorial of Strategy Writing with FMZ Quant Trading Platform (Must Read)Getting Started with FMZ Quant Trading Platform (Must Read)
Comment
All comments (3)
您好,python策略可以同时引用多个模版类库。但是模版类库之间是隔离的,无法相互引用。
但是您可以用import的方法导入自定义包。
您可以参考:
10 months ago
- 1
