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

前端 未结 0 544
孤独总比滥情好
孤独总比滥情好 2021-02-12 04:49

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

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


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