Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ranch expression
#1
i have in mind a few commands i want to implement in which arguments or input will need to express a number or a range (possibly with an increment). i want to implement a function that will take a string with such an expression and return a list of 1 to 3 numbers (generally ints but perhaps also floats .. maybe even complex) being expressed. a simpler command i will rewrite is one that outputs select lines from a file. i am looking for ideas on what the syntax of a range expression in a string (str or bytes) should be like so i can first write a parser function for it that returns a list if it is in a valid firm or False if it is invalid (None if the arguments are bad, such as the expression being an unparseable type). what are your ideas?
Tradition is peer pressure from dead people

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


Forum Jump:

User Panel Messages

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