Namedtuple like class

后端 未结 5 1920
有刺的猬
有刺的猬 2021-02-06 01:27

I find myself writing this class often in my python code when I need a quick single use class.

class Struct(object):
   def __init__( self, **kwargs ):
      for          


        
5条回答
  •  日久生厌
    2021-02-06 02:27

    You may want to look at Records by George Sakkis. It has worked well for me as a "mutable named tuple."

提交回复
热议问题