Hacker News new | ask | show | jobs
by Sean1708 2672 days ago
Oh god the amount of scripts I have that do something like:

  while True:
    for i, item in enumerate(list):
      print(i, item, sep=" - ")

    choice = input()

    if valid(choice):
      break
This would make those so much easier to write and give a much nicer UI at the same time.
1 comments

Can’t tell if you’re being sarcastic or not. Your above sample code is perfectly simple and straightforward. I would choose it over an over engineered ui library/dependency in a heartbeat.