Extends dict key error
Ouverte
- Langage dominant
- C++
- Étoiles
- 537
- Forks
- 223
- Merge moyen
- 11 h 22 min
- PR mergées (30 j)
- 2
Description
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
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.