File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1292,25 +1292,22 @@ class dict : public object {
1292
1292
return PyDict_Contains (m_ptr, detail::object_or_cast (std::forward<T>(key)).ptr ()) == 1 ;
1293
1293
}
1294
1294
1295
- object get (handle key, handle default_) const {
1295
+ object get (handle key, handle default_ = none() ) const {
1296
1296
if (PyObject *result = PyDict_GetItem (m_ptr, key.ptr ())) {
1297
1297
return reinterpret_borrow<object>(result);
1298
1298
} else {
1299
1299
return reinterpret_borrow<object>(default_);
1300
1300
}
1301
1301
}
1302
1302
1303
- object get (const char *key, handle default_) const {
1303
+ object get (const char *key, handle default_ = none() ) const {
1304
1304
if (PyObject *result = PyDict_GetItemString (m_ptr, key)) {
1305
1305
return reinterpret_borrow<object>(result);
1306
1306
} else {
1307
1307
return reinterpret_borrow<object>(default_);
1308
1308
}
1309
1309
}
1310
1310
1311
- object get (handle key) const { return get (key, none ()); }
1312
- object get (const char *key) const { return get (key, none ()); }
1313
-
1314
1311
private:
1315
1312
// / Call the `dict` Python type -- always returns a new reference
1316
1313
static PyObject *raw_dict (PyObject *op) {
You can’t perform that action at this time.
0 commit comments