Relative Content

Tag Archive for pythonipython

What does IPython expect after an underscore in a numeric literal?

I know that _s can be used as digit separator within numeric literals, between (groups of) digits, for instance 1_000 means 1000 and 0_0 means 00 or just 0. Today I accidentally typed a letter after the underscore, say 0_z. After pressing Enter, IPython showed the continuation prompt and the cursor: it expected more! But what? Example:

What does IPython expect after an underscore in a numeric literal?

I know that _s can be used as digit separator within numeric literals, between (groups of) digits, for instance 1_000 means 1000 and 0_0 means 00 or just 0. Today I accidentally typed a letter after the underscore, say 0_z. After pressing Enter, IPython showed the continuation prompt and the cursor: it expected more! But what? Example:

What does IPython expect after an underscore in a numeric literal?

I know that _s can be used as digit separator within numeric literals, between (groups of) digits, for instance 1_000 means 1000 and 0_0 means 00 or just 0. Today I accidentally typed a letter after the underscore, say 0_z. After pressing Enter, IPython showed the continuation prompt and the cursor: it expected more! But what? Example: