Logo
TGCATALOG
Catalog Collections Blog
Code on a Napkin - Python coding

Code on a Napkin - Python coding

Channel about programming in Python and other languages. Simple explanations and codes.

No ratings
317
26.10.2026
317
26.10.2026
No ratings
317
26.10.2026
Safe redirect via bot
О канале

Channel about programming in Python and other languages. Simple explanations and codes.

Подписчиков 2,345
Тематика Technology
Язык English
Ссылка t.me/napkincode

We also recommend

Kekaton AI | Voiceover and voice clone
Kekaton AI | Voiceover and voice clone
Bot

AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.

Description

Resource for those interested in programming. Focus on Python, but covers other topics as well. Simple examples and breakdowns.

Latest posts

Code on a Napkin - Python coding
Code on a Napkin - Python coding
🔒Открыть пост
и посмотреть медиа
Знаете ли вы, что return внутри finally подавляет исключение из try? Python всегда выполняет finally: и после успешного return, и после исключения. Но если finally сам содержит return, break или continue – управление уходит по этому пути, а исключение из try просто отбрасывается без traceback. def divide(a, b): try: return a / b finally: return -1 print(divide(10, 0)) # -1 – ZeroDivisionError просто исчез ZeroDivisionError действительно возникает внутри try. Но finally перехватывает управление своим return -1 раньше, чем исключение успевает подняться выше и функция возвращает -1, как будто ничего не случилось. def divide(a, b): try: return a / b finally: print("cleanup") divide(10, 0) # cleanup # Traceback (most recent call last): # ... # ZeroDivisionError: division by zero Без return в finally поведение обычное: cleanup отрабатывает, а исключение летит дальше – разница только в одном операторе. def process(items): for item in items: try: if item < 0: raise ValueError(item) finally: break return "done" print(process([-1, -2, -3])) # done – ValueError из первой итерации потерян break и continue в finally работают так же, как return – любой из них обрывает обработку исключения. Документация Питона прямо говорит, что если finally выполняет break, continue или return, сохраненное исключение не поднимается повторно. finally гарантированно выполнится, но не гарантирует, что исключение из try дойдет до вызывающего кода. return, break или continue внутри finally – способ молча проглотить баг, который потом еще и по логам не найдется. Код на салфетке x Кусочки кода
Code on a Napkin - Python coding
FAQ

Open Code on a Napkin - Python coding in Telegram and press the Start button. No separate registration is required.

Yes. The service is designed to be straightforward: open the resource, follow the on-screen instructions and start using it.

No. You can use Code on a Napkin - Python coding directly in Telegram unless the resource description says otherwise.

Access depends on the resource. Check the current information in Telegram after opening Code on a Napkin - Python coding.

The exact features depend on the resource. Open Code on a Napkin - Python coding to see its current functions, content and access conditions.
Subscriber dynamics
+-0.5% last 30 days
Current
2,345
Month ago
2,356
Average growth
+0 / day
Updated
1 day ago

Reviews for channel Code on a Napkin - Python coding

Log in to leave a review

Only registered users can share their opinion.

No reviews yet

Be the first to share your impression of this resource!

Similar resources

Loading
Switch to Light Theme
Home Catalog Collections Blog Login