class LogEvent:
bus_seq = None
line_number = None
event_received_time = None
app_name = None
source_module_name = None
source = None
filename = None
message = None
serial_id = None
thread_id = None
log_event=LogEvent()
print(dir(log_event))
log_event.bus_seq='1111'
print(log_event.bus_seq)
[root@master tmp]# python a3.py
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'app_name', 'bus_seq', 'event_received_time', 'filename', 'line_number', 'message', 'serial_id', 'source', 'source_module_name', 'thread_id']
1111
python 定义数据结构
最新推荐文章于 2024-02-22 14:23:50 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)