{"action":"opened","issue":{"url":"https://api.github.com/repos/hylang/hy/issues/1144","repository_url":"https://api.github.com/repos/hylang/hy","labels_url":"https://api.github.com/repos/hylang/hy/issues/1144/labels{/name}","comments_url":"https://api.github.com/repos/hylang/hy/issues/1144/comments","events_url":"https://api.github.com/repos/hylang/hy/issues/1144/events","html_url":"https://github.com/hylang/hy/issues/1144","id":186374786,"number":1144,"title":"Import has a LOT of corner cases","user":{"login":"kirbyfan64","id":1690697,"avatar_url":"https://avatars.githubusercontent.com/u/1690697?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbyfan64","html_url":"https://github.com/kirbyfan64","followers_url":"https://api.github.com/users/kirbyfan64/followers","following_url":"https://api.github.com/users/kirbyfan64/following{/other_user}","gists_url":"https://api.github.com/users/kirbyfan64/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbyfan64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbyfan64/subscriptions","organizations_url":"https://api.github.com/users/kirbyfan64/orgs","repos_url":"https://api.github.com/users/kirbyfan64/repos","events_url":"https://api.github.com/users/kirbyfan64/events{/privacy}","received_events_url":"https://api.github.com/users/kirbyfan64/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-31T19:28:25Z","updated_at":"2016-10-31T19:28:25Z","closed_at":null,"body":"```\r\nryan@DevPC-LX /media/ryan/stuff/hy attrerr $ ./run --spy\r\nhy 0.11.0 using CPython(default) 2.7.6 on Linux\r\n=> (import [xyz])  ; Looks ok.\r\nimport xyz\r\n=> (import [xyz []]) ; This makes no sense and compiles as something that makes less sense.\r\nfrom xyz import xyz\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name xyz\r\n=> (import [xyz [* *]])  ; Yay stars!\r\nfrom xyz import *, *\r\n=> (import [xyz [* * * * * * * * * * * * * * * * * * * *]])  ; LOOK, it's July 4th!\r\nfrom xyz import *, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *, *\r\n=> (import [xyz [* :as 1]])  ; I have no clue what the hell is doing.\r\nfrom xyz import * as 1\r\n=> (import [xyz [1]])  ; Speaking of which, we can import numbers (!).\r\nfrom xyz import 1\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name 1\r\n=> (import [xyz [:foo]])  ; This also makes no sense.\r\nfrom xyz import hy_:foo_9x8x\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name hy_:foo_9x8x\r\n=> (import [xyz [a : b]])  ; Same as [a :as b].\r\nfrom xyz import a as b\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name a\r\n=> (import [xyz [a :RANDOM_STUFF b]])  ; Ditto.\r\nfrom xyz import a as b\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name a\r\n=> (import [xyz [a.b]])  ; Again, makes no sense.\r\nfrom xyz import a.b\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name a.b\r\n=> (import [xyz [1/2]])  ; Well, that's awkward\r\nfrom xyz import (u'fraction' 1L 2L)\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\nImportError: cannot import name (u'fraction' 1L 2L)\r\n=> \r\nryan@DevPC-LX /media/ryan/stuff/hy attrerr $ \r\n```"}}
{"actor":{"display_login":"kirbyfan64"}}