3 ms·
Sure, but typing ic(someVariable) is a lot faster for me than typing print(f"{someVariable=}") in Python3.8 or >, and still faster than typing print(f"s
by mcswell 6y ago
Sure, but typing
ic(someVariable)
is a lot faster for me than typing
print(f"{someVariable=}")
in Python3.8 or >, and still faster than typing
print(f"someVariable={someVariable}")
in Python < 3.8 (which I still need to use in some cases).
It's especially faster when I think about how often I fat-finger the '{' (and '}', when my editor doesn't insert the matching brace automagically). Of course YMMV.
- QuesnayJr 6y agoI (and the person I replied to, I suspect) interpreted the title to mean that you shouldn't debug by printing stuff to the console at all, but instead do some other thing.