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 {
12921292 return PyDict_Contains (m_ptr, detail::object_or_cast (std::forward<T>(key)).ptr ()) == 1 ;
12931293 }
12941294
1295- object get (handle key, handle default_) const {
1295+ object get (handle key, handle default_ = none() ) const {
12961296 if (PyObject *result = PyDict_GetItem (m_ptr, key.ptr ())) {
12971297 return reinterpret_borrow<object>(result);
12981298 } else {
12991299 return reinterpret_borrow<object>(default_);
13001300 }
13011301 }
13021302
1303- object get (const char *key, handle default_) const {
1303+ object get (const char *key, handle default_ = none() ) const {
13041304 if (PyObject *result = PyDict_GetItemString (m_ptr, key)) {
13051305 return reinterpret_borrow<object>(result);
13061306 } else {
13071307 return reinterpret_borrow<object>(default_);
13081308 }
13091309 }
13101310
1311- object get (handle key) const { return get (key, none ()); }
1312- object get (const char *key) const { return get (key, none ()); }
1313-
13141311private:
13151312 // / Call the `dict` Python type -- always returns a new reference
13161313 static PyObject *raw_dict (PyObject *op) {
You can’t perform that action at this time.
0 commit comments