alecthomas / alecthomas/voluptuous
Inclusive should support default values
Aperta
- Lingua principale
- Python
- Stelle
- 1.9k
- Fork
- 237
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The `Inclusive` schema builder does not support default values even though it inherits from `Optional`, which does support them. It would be valuable if defaults were supported for situations such as this:
```
dimensions = Schema({
Inclusive("width", "dims", default=1024): Coerce(int),
Inclusive("height", "dims", default=576): Coerce(int),
}
```
In general, when using `Inclusive` to enforce "all or nothing", having default values for the "nothing" case would be very helpful.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.