反正是否支持python中的结构并且它不支持普通的关键字struct?
例如:
struct node
{
unsigned dist[20];
unsigned from[20];
}rt[10];
Run Code Online (Sandbox Code Playgroud)
我如何将其转换为python结构?
我认为Python相当于C-structs classes:
class Node:
def __init__(self):
self.dist_ = []
self.from_ = []
rt = []
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
394 次 |
| 最近记录: |