2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00

minor cleanup

[SVN r8051]
This commit is contained in:
Dave Abrahams
2000-10-28 21:54:19 +00:00
parent 582b8a5646
commit c636a00ea1

View File

@@ -234,11 +234,11 @@ Ptr Dict::operator[](Ptr key) const {
}
Ptr Dict::get_item(const Ptr& key, const Ptr& _default /* = Ptr() */)
Ptr Dict::get_item(const Ptr& key, const Ptr& default_ /* = Ptr() */)
{
PyObject* value_or_null = PyDict_GetItem(get(), key.get());
if (value_or_null == 0 && !PyErr_Occurred())
return _default;
return default_;
else
return Ptr(value_or_null, Ptr::borrowed); // Will throw if there was another error
}