Visitar URL original
Cannot Import Literal · Issue #708 · python/typing · GitHub
The Wayback Machine - https://web.archive.org/web/20201019100851/https://github.com/python/typing/issues/708
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Import Literal #708

Open
sarthak212 opened this issue Mar 25, 2020 · 2 comments
Open

Cannot Import Literal #708

sarthak212 opened this issue Mar 25, 2020 · 2 comments

Comments

@sarthak212
Copy link

@sarthak212 sarthak212 commented Mar 25, 2020

Python Version: Python 3.7.5
Os: Kali Linux 2020.1

When trying to import Literal it Shows following error:
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)

Is Literal deprecated in Python3 because in Python2 typing source code Literal is present but in new typing.py it isn't?

@gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Mar 25, 2020

Duplicate. It is not deprecated. See #707

@sarthak212
Copy link
Author

@sarthak212 sarthak212 commented Mar 26, 2020

Ok, thanks @gvanrossum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.