How to make “keyword-only” fields with dataclasses?

前端 未结 0 1519
情深已故
情深已故 2021-02-12 04:19

Since 3.0 there is support to make an argument keyword only:

class S3Obj:
    def __init__(self, bucket, key, *, storage_class=\'Standard\'):
        self.bucket         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题