Helper function to recursively determine if any key in a dictionary starts with a dollar
(d)
| 1022 | |
| 1023 | |
| 1024 | def key_starts_with_dollar(d): |
| 1025 | """Helper function to recursively determine if any key in a |
| 1026 | dictionary starts with a dollar |
| 1027 | """ |
| 1028 | for k, v in d.items(): |
| 1029 | if (k.startswith("$")) or (isinstance(v, dict) and key_starts_with_dollar(v)): |
| 1030 | return True |
| 1031 | |
| 1032 | |
| 1033 | class DictField(ComplexBaseField): |