Parses the string representation of a Python boolean */
| 274 | Parses the string representation of a Python boolean |
| 275 | */ |
| 276 | inline bool parse_bool(const std::string &in) { |
| 277 | if (in == "True") |
| 278 | return true; |
| 279 | if (in == "False") |
| 280 | return false; |
| 281 | |
| 282 | throw std::runtime_error("Invalid python boolan."); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | Parses the string representation of a Python str |