Python Forum
can a number preceed a line of code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can a number preceed a line of code?
#3
it looks like i need to use a scheme with something other than just a number, such as maybe a number followed by something such as ":". i want to be sure this containment scheme cannot ever look like valid Python code. for example, an alternate test would be to test if the whole line is valid Python, to decide to remove the number (if valid, leave the line(s) unchanged). what i need is a string scheme such that decimal digits plus something at the start of a line always makes the line distinguishable from valid Python code so it can be decided that the scheme has been prepended to the line.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
can a number preceed a line of code? - by Skaperen - May-07-2024, 05:40 AM
RE: can a number preceed a line of code? - by Skaperen - May-07-2024, 10:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  code style - one line subclause on same line Skaperen 5 4,990 Nov-29-2017, 01:44 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020