Asked By – Anurag-Sharma
I tried to execute the following code on a Python IDLE
from __future__ import braces
And I got the following error:
SyntaxError: not a chance
What does the above error mean?
Now we will see solution for issue: Syntax Error: Not a Chance – What is this error?
You have found an easter egg in Python. It is a joke.
It means that delimiting blocks by braces instead of indentation will never be implemented.
Normally, imports from the special
__future__ module enable features that are backwards-incompatible, such as the
print() function, or true division.
So the line
from __future__ import braces is taken to mean you want to enable the ‘create blocks with braces’ feature, and the exception tells you your chances of that ever happening are nil.
You can add that to the long list of in-jokes included in Python, just like
import this and
import antigravity. The Python developers have a well-developed sense of humour!