{"action":"created","issue":{"url":"https://api.github.com/repos/pybind/pybind11/issues/547","repository_url":"https://api.github.com/repos/pybind/pybind11","labels_url":"https://api.github.com/repos/pybind/pybind11/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/pybind/pybind11/issues/547/comments","events_url":"https://api.github.com/repos/pybind/pybind11/issues/547/events","html_url":"https://github.com/pybind/pybind11/issues/547","id":194165881,"number":547,"title":"Unable to store std::string in py::dict","user":{"login":"skebanga","id":6157939,"avatar_url":"https://avatars.githubusercontent.com/u/6157939?v=3","gravatar_id":"","url":"https://api.github.com/users/skebanga","html_url":"https://github.com/skebanga","followers_url":"https://api.github.com/users/skebanga/followers","following_url":"https://api.github.com/users/skebanga/following{/other_user}","gists_url":"https://api.github.com/users/skebanga/gists{/gist_id}","starred_url":"https://api.github.com/users/skebanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skebanga/subscriptions","organizations_url":"https://api.github.com/users/skebanga/orgs","repos_url":"https://api.github.com/users/skebanga/repos","events_url":"https://api.github.com/users/skebanga/events{/privacy}","received_events_url":"https://api.github.com/users/skebanga/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-12-07T20:51:39Z","updated_at":"2016-12-07T23:08:50Z","closed_at":"2016-12-07T20:54:51Z","body":"The below sample application fails to compile\r\n\r\n```cpp\r\n#include <pybind11/pybind11.h>\r\n\r\nnamespace py = pybind11;\r\n\r\nint main()\r\n{\r\n\tpy::dict dict;\r\n\tstd::string value = \"bar\";\r\n\tdict[\"foo\"] = value;\r\n\r\n\treturn 0;\r\n}\r\n```\r\n\r\nThe error returned is:\r\n\r\n```\r\nmain.cpp:40:14: error: no match for ‘operator=’ (operand types are \\\r\n    ‘pybind11::detail::item_accessor \\\r\n        {aka pybind11::detail::accessor<pybind11::detail::accessor_policies::generic_item>}’ \\\r\n    and ‘std::__cxx11::string \\\r\n        {aka std::__cxx11::basic_string<char>}’)\r\n  dict[\"foo\"] = value;\r\n```\r\n\r\nHow does one store a string in a dict?"},"comment":{"url":"https://api.github.com/repos/pybind/pybind11/issues/comments/265602951","html_url":"https://github.com/pybind/pybind11/issues/547#issuecomment-265602951","issue_url":"https://api.github.com/repos/pybind/pybind11/issues/547","id":265602951,"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-12-07T23:08:50Z","updated_at":"2016-12-07T23:08:50Z","body":"The problem I see with that is that somebody very familiar with the library (i.e. a contributor like @dean0x7d , @jagerman, @aldanor, @pschella, @SylvainCorlay, ..., or myself) needs to actively monitor the room and respond to questions. I think that users mostly pop into these sort of chat rooms to ask a question and then disappear, meaning that by default there isn't generally a big community of like-minded users that will try to respond. That's an extra strain on the developers -- as for myself, I can say that I just won't have the time for it. If others are happy to participate, then why not."}}
{"actor":{"display_login":"wjakob"}}