drop_blank_attrs
drop_blank_attrs(
attrs: <class ‘dict ,
names: collections.abc.Iterable[str] ,
)-> ’dict’
Drop the named attrs whose value is blank, in place.
A field the vendor left empty, or omitted, states nothing. Keeping it turns “the file does not say” into a value downstream code can match on, so the parse boundary drops it rather than passing the blank along.
Parameters
| Parameter | Description |
|---|---|
| attrs | The parsed attrs, modified in place and returned. |
| names |
The attrs to drop when blank. A name is blank when it is missing, None, or a string of only whitespace. |