* This translates to the Python code ``key in obj``. * * @param key The key to check for. * @returns Is ``key`` present?
(key: any)
| 1081 | * @returns Is ``key`` present? |
| 1082 | */ |
| 1083 | has(key: any): boolean { |
| 1084 | let ptrobj = _getPtr(this); |
| 1085 | let result; |
| 1086 | try { |
| 1087 | Py_ENTER(); |
| 1088 | result = __pyproxy_contains(ptrobj, key); |
| 1089 | Py_EXIT(); |
| 1090 | } catch (e) { |
| 1091 | API.fatal_error(e); |
| 1092 | } |
| 1093 | if (result === -1) { |
| 1094 | _pythonexc2js(); |
| 1095 | } |
| 1096 | return result === 1; |
| 1097 | } |
| 1098 | } |
| 1099 | |
| 1100 | /** |
no test coverage detected