{"action":"created","issue":{"url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/642","labels_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/642/labels{/name}","comments_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/642/comments","events_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/642/events","html_url":"https://github.com/firedrakeproject/firedrake/issues/642","id":119064303,"number":642,"title":"Buggy autocompletion","user":{"login":"miklos1","id":4210841,"avatar_url":"https://avatars.githubusercontent.com/u/4210841?v=3","gravatar_id":"","url":"https://api.github.com/users/miklos1","html_url":"https://github.com/miklos1","followers_url":"https://api.github.com/users/miklos1/followers","following_url":"https://api.github.com/users/miklos1/following{/other_user}","gists_url":"https://api.github.com/users/miklos1/gists{/gist_id}","starred_url":"https://api.github.com/users/miklos1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miklos1/subscriptions","organizations_url":"https://api.github.com/users/miklos1/orgs","repos_url":"https://api.github.com/users/miklos1/repos","events_url":"https://api.github.com/users/miklos1/events{/privacy}","received_events_url":"https://api.github.com/users/miklos1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/firedrakeproject/firedrake/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-26T15:28:28Z","updated_at":"2016-01-08T14:25:50Z","closed_at":"2016-01-05T18:47:25Z","body":"If I type in IPython:\r\n```\r\nfrom firedrake import *\r\nmesh = UnitSquareMesh(2, 2)\r\nmesh.\r\n```\r\nand press TAB after the dot, I get the following suggestions:\r\n```\r\nmesh.cell                                mesh.topological_dimension\r\nmesh.coordinates                         mesh.topology\r\nmesh.geometric_dimension                 mesh.ufl_cargo\r\nmesh.init                                mesh.ufl_cell\r\nmesh.init_cell_orientations              mesh.ufl_coordinate_element\r\nmesh.is_piecewise_linear_simplex_domain  mesh.ufl_coordinates\r\nmesh.spatial_index                       mesh.ufl_id\r\nmesh.topological                         mesh.uid\r\n```\r\nthen I can finish like this:\r\n```\r\nIn [3]: mesh.num_cells()\r\nOut[3]: 8\r\n```\r\nSo `num_cells` works despite not being suggested. This is because `num_cells` lives on `mesh.topology`, but accessing `mesh` will also try `mesh.topology`, so the above will work.\r\nOf course, the code assistance problem could be fixed by overriding `__dir__`, however doing so in Python 2 requires ugly stuff (http://stackoverflow.com/a/32453194)."},"comment":{"url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/comments/170017264","html_url":"https://github.com/firedrakeproject/firedrake/issues/642#issuecomment-170017264","issue_url":"https://api.github.com/repos/firedrakeproject/firedrake/issues/642","id":170017264,"user":{"login":"miklos1","id":4210841,"avatar_url":"https://avatars.githubusercontent.com/u/4210841?v=3","gravatar_id":"","url":"https://api.github.com/users/miklos1","html_url":"https://github.com/miklos1","followers_url":"https://api.github.com/users/miklos1/followers","following_url":"https://api.github.com/users/miklos1/following{/other_user}","gists_url":"https://api.github.com/users/miklos1/gists{/gist_id}","starred_url":"https://api.github.com/users/miklos1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miklos1/subscriptions","organizations_url":"https://api.github.com/users/miklos1/orgs","repos_url":"https://api.github.com/users/miklos1/repos","events_url":"https://api.github.com/users/miklos1/events{/privacy}","received_events_url":"https://api.github.com/users/miklos1/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T14:25:50Z","updated_at":"2016-01-08T14:25:50Z","body":"I think the `MeshTopologyProxy` should solve the problem with the error messages as well."}}