Это видео недоступно.
Сожалеем об этом.
Stop Using Print to Debug in Python. Use ICECREAM Instead 🍧
HTML-код
- Опубликовано: 16 авг 2024
- Hello Python Programmers!
In this cool python tutorial I'm going to introduce you a "Print()" alternative in python to debug you code easier and more efficient! and that Alternative is the "ic()" from the Icecream library. it provides a lot more useful additional information when you print something that makes you debugging a lot easier and faster!
00:00 INTRO
00:21 MAIN PART
03:03 OUTRO
Recommended Video:
"TOP 5 VSCODE Shortcuts You DIDN'T know before"
• TOP 5 VSCODE Shortcuts...
--
Official Links
Instagram : / hoveredcube
Discord : / discord
Github : github.com/Hov...
Telegram channel : t.me/hoveredcube
Manager : t.me/hoveredcu...
-
Music in this video:
made by:
infraction no copyright music
check out their amazing channel
channel link: / infraction
All GIFs in this video from giphy.com and I don't created or own them.
-
#programming #computerscience #python
Nice short, very straightforward, and useful video.
Glad you liked it
So it's f strings but not built into the language? Why not use print(f"{user_weight=}")
what magic did ic use to know the variable/function name?
The most pythonic way I can think of is using f-strings (3.8 required)
pi = 3.14159
print(f”{pi=}”)
---------
pi=3.14159
---------
This does however require you to know the name, so the library is probably directly reading locals() and or globals()…
If you want to know how the F-String knows the variable name, you’d probably have to dig in the c source code for python.
@@raumi_ Thanks for your explanation
Nice thanks
so cool
Nice thx. Useful
😀 your welcome!
Yoooooooo bro