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

Left zeros not allowed in a variable #6944

Closed
labay11 opened this issue Jun 22, 2023 · 3 comments
Closed

Left zeros not allowed in a variable #6944

labay11 opened this issue Jun 22, 2023 · 3 comments
Labels

Comments

@labay11
Copy link

labay11 commented Jun 22, 2023

Description

This error occurs in both python and Julia on a jupyter notebook. The definition of a variable like

a = 0xxxxxx
b = .0xxxxx

where the x's are different digits 0-9, makes the program crash.

  • In python, the first zero entry is highlighted in red and the other numbers to the right can still be shown but the cell cannot be executed.
  • In julia, the first zero is not highlighted but the other numbers to the right of the first zero are hidden from the screen. However, they are present in memory since pressing delete removes all of these hidden digits one by one until the initial 0 is reached.

The behavior is not reproduced in a python/julia console or in a notebook opened in VisualStudio. Also, the syntax c = 0.xxxxxxx is accepted in the jupyter notebook and produces no error.

Another thing we tried was to edit the notebook externally in VScode with different cells for the variables a, b & c and open it later in the browser. This produces that the cells containing examples a & b are not highlighted and cannot be executed. Instead, cell c is correctly highlighted and executed.

Context

  • Operating System and version: Linux Ubuntu 22.04
  • Browser and version: Mozilla Firefox 114.0.1
  • VScode: 1.79.2
  • Jupyter versions:
jupyter core     : 4.6.1
jupyter-notebook : 6.0.3
qtconsole        : 4.6.0
ipython          : 7.12.0
ipykernel        : 5.1.4
jupyter client   : 5.3.4
jupyter lab      : 1.2.6
nbconvert        : 5.6.1
ipywidgets       : 7.5.1
nbformat         : 5.0.4
traitlets        : 4.3.3
@labay11 labay11 added bug status:Needs Triage Applied to issues that need triage labels Jun 22, 2023
@labay11 labay11 changed the title Trailing zeros not allowed in a variable Left zeros not allowed in a variable Jun 23, 2023
@RRosio
Copy link
Collaborator

RRosio commented Jun 27, 2023

Hi @labay11 thank you for submitting this issue! In python, integers cannot begin with the number zero.
What error are you seeing when Notebook crashes?

@RRosio
Copy link
Collaborator

RRosio commented Jul 5, 2023

Hi @labay11, just following up with you on this, is there a chance you could provide us with any error messages you may be seeing?

@RRosio
Copy link
Collaborator

RRosio commented Jul 11, 2023

Hi @labay11, I'll close this issue out but please feel free to reopen this with any additional information!

@RRosio RRosio closed this as completed Jul 11, 2023
@jtpio jtpio removed the status:Needs Triage Applied to issues that need triage label Jul 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants