mahmoud / glom

☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
https://glom.readthedocs.io
Other
1.89k stars 61 forks source link

Use case for arg-mode #213

Open kurtbrose opened 3 years ago

kurtbrose commented 3 years ago

right now the default kwarg of Optional must be a constant

it would be convenient if it could be a type e.g.

{   Optional('numbers', default=list):  [int]  }

but evaluating types introduces the problem of ambiguity

arg-mode would let you do this

{   Optional('numbers', default=[]):  [int]  }