TGViewer
sanspie's notes sanspie's notes @sanspie_notes · 817 subscribers
Post #304 736

Forwarded from Python etc

PEP 657 (landed into Python 3.11) enhanced tracebacks so that they now include quite a precise location of where the error occurred:

Traceback (most recent call last):
File "query.py", line 24, in add_counts
return 25 + query_user(user1) + query_user(user2)
^^^^^^^^^^^^^^^^^
File "query.py", line 32, in query_user
return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable

It shows not only where the error occurred for each frame, but also which code was executed. Beautiful!
More from @sanspie_notes
  1. Apr 30, 2026CVE-2026-31431 Красивая и простая LPE под большинство популярных Linux-дистрибутивов. Репо…
  2. Apr 13, 2026document post
  3. Apr 4, 2026https://habr.com/ru/articles/1019200/
  4. Mar 27, 2026В телеге нашли нолик на 9.8 https://www.zerodayinitiative.com/advisories/upcoming/
  5. Jan 11, 2026Про "балканизацию" интернета я говорю ~15 лет уже. Прости нас, Тим! Мы всё проебали. Cloud…
  6. Dec 30, 2025https://bigdata.2minutestreaming.com/p/mongobleed-explained-simply
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →