Extends dict key error
Đang mở
- Ngôn ngữ chính
- C++
- Star
- 537
- Fork
- 223
- Merge trung bình
- 11 giờ 22 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
I have written two snippets, with cpp and python
```c++
#include
#include
#include
using namespace boost::python;
struct testdict : public boost::python::dict {
testdict()
{
std::cout << "constructor" << std::endl;
}
virtual ~testdict()
{
std::cout << "destructor" << std::endl;
}
};
BOOST_PYTHON_MODULE(boost) {
class_>("testdict");
};
```
```python
#!/usr/bin/python3
# coding=utf-8
import boost
data = boost.testdict()
data['key'] = 1
print(data)
print('key' in data)
```
compile cpp code and run python code the output is not expected
```
constructor
{'key': 1}
False
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.