Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 handling open failures
#1
do all open() failures always cause an exception in the open() call and never just return a None or something else that could cause an exception later on? i'm wanting to move some failure handling to with open() that could be awkward if it needs to also check for returned errors.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote
#2
The doc says
Output:
Open file and return a corresponding file object. If the file cannot be opened, an OSError is raised.
Why not believe it?
micseydel likes this post
Quote
#3
(Jan-07-2020, 09:59 PM)Gribouillis Wrote: The doc says
Output:
Open file and return a corresponding file object. If the file cannot be opened, an OSError is raised.
Why not believe it?

because i didn't see that line.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)