Dataclass field metadata: Pythonic equivalence of Go struct tag
1. What is Golang’s struct tag Recently I have been writing some Go and there is a particular language feature in Go that I really like: struct tag. Basically, a struct tag is just an arbitrary string literal that you can attach to a struct, which later on you can decode and turn into something useful via reflection. If that still sounds too cryptic, consider this example: type MyAwesomeGoServiceConfig struct { Host string `envconfig:"SERVICE_HOST" another_random_tag:"amazing"` Port string `envconfig:"SERVICE_PORT" this_is_seriously_cool:"agree"` } The code above, apart from sounding uncharacteristically upbeat, is 100% valid Golang:...