Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 f-strings in a script to be made public
#1
just about all my python scripts now use f-strings. many of those use many f-strings. as literals to be parsed during the compile phase, in python interpreters before version 3.6, they are syntax errors. this means users get told about this in a traceback. is there some means i can add to this information to be more informative to users that might not be coders so they understand what to do to fix it?
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#2
IMHO, I think the best approach is to specify in the description/docstring the script requires 3.6+ and versions before that are not supported.
Quote
#3
i already do that, both in the docstring, and in comments. i just wanted to go a step further and handle the situation of the user trying to run the script.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  print a list strings is fast but printing the joined strings is slow Skaperen 9 323 Aug-26-2019, 07:48 PM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)