mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
allow importing from a module named None if it has an 'as' clause
This commit is contained in:
parent
565e1b6bb7
commit
d1f5a59edb
2 changed files with 8 additions and 4 deletions
|
@ -281,6 +281,8 @@ if 1:
|
|||
self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'exec')
|
||||
# This is ok.
|
||||
compile("from None import x", "tmp", "exec")
|
||||
compile("from x import None as y", "tmp", "exec")
|
||||
compile("import None as x", "tmp", "exec")
|
||||
|
||||
def test_import(self):
|
||||
succeed = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue