question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(python) Keywords directly following numbers are not detected

See original GitHub issue

Describe the issue As keywords and variables cannot start with a number in Python, the space between a number and a keyword can be skipped. The highlighting should separate the number and the keyword part.

Actual output

Which language seems to have the issue? python

Are you using highlight or highlightAuto? highlight

Sample Code to Reproduce

print(1if 0==0else"b")

Expected behavior Expeted output

(Also see GitHub’s highlighting above)

(Also, also should print be a built-in here?)

Additional context Found on this StackExchange answer: https://codegolf.stackexchange.com/a/218451/25026 StackExchange Code

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joshgoebelcommented, Mar 17, 2021

Reaching out to the author of the PR for our Python numeric support so see if there is a reason for all those \b at the end of number matches. But if this boils down to “better support average python” vs “better support code golf” (with no easy/clear solution) then I’ll probably close this a #wontfix and just say that code golf is not our specialty. We’ll see.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Keywords: An Introduction
Python keywords are special reserved words that have specific meanings and purposes and can't be used for anything but those specific purposes. These...
Read more >
Python Keywords and Identifiers - GeeksforGeeks
Keywords are used to define the syntax of the coding. The keyword cannot be used as an identifier, function, and variable name. All...
Read more >
4. More Control Flow Tools — Python 3.11.1 documentation
The keyword ' elif ' is short for 'else if', and is useful to avoid ... This is exemplified by the following loop,...
Read more >
Built-in Functions — Python 3.11.1 documentation
The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical...
Read more >
7. Simple statements — Python 3.11.1 documentation
In interactive mode, if the value is not None , it is converted to a string using the built-in repr() function and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found