Enough of These Python Practices
mhaimdat.com
Enough of These Python Practices
1–8 of 8 posts
Re: Enough of These Python Practices
#2Why is use of print better than the logging module?
Re: Enough of These Python Practices
#3[deleted]
Re: Enough of These Python Practices
#4> Don't
> text_c = text_a + text_b
Stopped reading there.
Re: Enough of These Python Practices
#5Some of these are bad. Pathlib is great for a one-liner to read files, and the “.get()” is broken. If it returns None, you’ll get an error about comparing None to an integer.
Re: Enough of These Python Practices
#6The type annotation `Optional[Tuple[int, int]]` is the equivalent to `None | Tuple[int, int]`. `Tuple[Optional[int], Optional[int]]` is what you wanted.
Re: Enough of These Python Practices
#7Why is use of print better than the logging module?
No post body was provided.
Re: Enough of These Python Practices
#8Some of these are bad. Pathlib is great for a one-liner to read files, and the “.get()” is broken. If it returns None, you’ll get an error about comparing None to an integer.
No post body was provided.