According to http://docs.python.org/2/reference/simple_stmts.html#the-import-statement, We can use

from module import identifier

and identifier can be module.name

But python suggest an syntax error, is there a mistake in the document?

有帮助吗?

解决方案

identifier cannot contain periods. Your assumption is incorrect.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top