{"action":"created","issue":{"url":"https://api.github.com/repos/pybind/pybind11/issues/175","repository_url":"https://api.github.com/repos/pybind/pybind11","labels_url":"https://api.github.com/repos/pybind/pybind11/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/pybind/pybind11/issues/175/comments","events_url":"https://api.github.com/repos/pybind/pybind11/issues/175/events","html_url":"https://github.com/pybind/pybind11/issues/175","id":150369924,"number":175,"title":"def_readwrite for a container does not persist changes","user":{"login":"wichert","id":199657,"avatar_url":"https://avatars.githubusercontent.com/u/199657?v=3","gravatar_id":"","url":"https://api.github.com/users/wichert","html_url":"https://github.com/wichert","followers_url":"https://api.github.com/users/wichert/followers","following_url":"https://api.github.com/users/wichert/following{/other_user}","gists_url":"https://api.github.com/users/wichert/gists{/gist_id}","starred_url":"https://api.github.com/users/wichert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wichert/subscriptions","organizations_url":"https://api.github.com/users/wichert/orgs","repos_url":"https://api.github.com/users/wichert/repos","events_url":"https://api.github.com/users/wichert/events{/privacy}","received_events_url":"https://api.github.com/users/wichert/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-22T13:28:07Z","updated_at":"2016-04-28T14:35:00Z","closed_at":"2016-04-22T14:52:27Z","body":"I suspect this is a result of returning a copy? My code looks like this:\r\n\r\n```c++\r\n\r\nclass A {\r\npublic:\r\n    std::list<std::string> images;\r\n};\r\n\r\npy::class_<A>(m, \"A\")\r\n   def_readwrite(\"images\", &A::images)\r\n   ;\r\n```\r\n\r\nTrying to add entries to that list does not work:\r\n\r\n```python\r\n>>> a = A()\r\n>>> a.images\r\n[]\r\n>>> a.images.append('foo')\r\n>>> a.images\r\n[]\r\n>>> a.images = ['foo']\r\n>>> a.images\r\n['foo']\r\n>>> a.images.append('buz')\r\n>>> a.images\r\n['foo']\r\n```"},"comment":{"url":"https://api.github.com/repos/pybind/pybind11/issues/comments/215446102","html_url":"https://github.com/pybind/pybind11/issues/175#issuecomment-215446102","issue_url":"https://api.github.com/repos/pybind/pybind11/issues/175","id":215446102,"user":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T14:35:00Z","updated_at":"2016-04-28T14:35:00Z","body":"FYI: The way that opaque objects are handled changed completely as of the latest commit (making things much easier)."}}