3 ms·
You don't need to know how it's implemented, you just need to know that you have to pass an object that can be closed. You can get that simply by reading the d
by readymade 15y ago
You don't need to know how it's implemented, you just need to know that you have to pass an object that can be closed. You can get that simply by reading the docs.
The exception that's thrown in your first example above certainly makes it blatantly obvious what you did wrong, which is nice. but you still have to know that the addition operator doesn't let you concatenate numbers and symbols in order to use it effectively, or your program will crash once you run it. That's on you.