|
I would avoid it if it would cause any friction with someone else who might use your code.
|
# ¿ Feb 1, 2017 19:18 |
|
|
# ¿ May 8, 2024 19:41 |
|
a witch posted:I would avoid it if it would cause any friction with someone else who might use your code. Please also note that "someone else" might be you in six months.
|
# ¿ Feb 1, 2017 19:19 |
|
If someone was typing "unused" instead of "_" I would immediately assume they were inexperienced with Python. Practicality beats purity and all that.
|
# ¿ Feb 1, 2017 21:23 |
|
Well, what do you mean when you say "elegant"? What don't you like about the code you posted ?
|
# ¿ Feb 25, 2017 20:52 |
|
Look into the logging module, it has a decent tutorial. If you want to write messages to the console and a file at the same time, you'll want a logger with a FileHandler and a StreamHandler attached. E: I'm on a phone so can't type code, here's the basic tutorial https://docs.python.org/3/howto/logging.html a witch fucked around with this message at 17:43 on Mar 1, 2017 |
# ¿ Mar 1, 2017 17:38 |
|
|
# ¿ May 8, 2024 19:41 |
|
huhu posted:I want the function to return false. However, with that code I'm getting "NameError: global name 'MaxRetryError' is not defined". Is MaxRetryError the type of the exception being thrown? You will have to import it to make the name visible.
|
# ¿ Mar 1, 2017 20:32 |