Dec-13-2019, 04:48 AM
i'm trying to handle reading a cache file using try/except. if the reading fails for any reason, the except clause goes out to the internet and tries to get the data, which is slow. but i want to include one test in the try clause which is an ordinary test ... is the cache over 32 days old. if it is too old i want the exception code to run so that it gets the live data, again. so, i'm thinking that the simple way to trip into the except clause is to just raise an exception it handles, like ValueError. does that make sense? will it work and be handled like any other exception in its list?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.