@ignore safely extract boolean value from dictionary or list :returns bool | None:
(self, dictionaryOrList, key1: IndexType, key2: IndexType, defaultValue: bool = None)
| 2941 | return defaultValue |
| 2942 | |
| 2943 | def safe_bool_2(self, dictionaryOrList, key1: IndexType, key2: IndexType, defaultValue: bool = None): |
| 2944 | """ |
| 2945 | @ignore |
| 2946 | safely extract boolean value from dictionary or list |
| 2947 | :returns bool | None: |
| 2948 | """ |
| 2949 | value = self.safe_value(dictionaryOrList, key1) |
| 2950 | if isinstance(value, bool): |
| 2951 | return value |
| 2952 | value2 = self.safe_value(dictionaryOrList, key2) |
| 2953 | if isinstance(value2, bool): |
| 2954 | return value2 |
| 2955 | return defaultValue |
| 2956 | |
| 2957 | def safe_bool(self, dictionaryOrList, key: IndexType, defaultValue: bool = None): |
| 2958 | """ |