3 ms·
Enough of These Python Practices
- proposicion47 5y agoWhy is use of print better than the logging module?
- omarmhaimdat 5y ago
- deleted 5y ago[deleted]
- inshadows 5y ago> Don't > text_c = text_a + text_b Stopped reading there.
- orf 5y agoSome 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.
- omarmhaimdat 5y ago
- manfre 5y agoThe type annotation `Optional[Tuple[int, int]]` is the equivalent to `None | Tuple[int, int]`. `Tuple[Optional[int], Optional[int]]` is what you wanted.