Skip to content

Add Python interview questions 151-155 - #17

Merged
ahmadalwareh merged 2 commits into
mainfrom
docs/python-interview-questions-151-155
Aug 13, 2026
Merged

Add Python interview questions 151-155 #17
ahmadalwareh merged 2 commits into
mainfrom
docs/python-interview-questions-151-155

Conversation

@ahmadalwareh

Copy link
Copy Markdown
Owner

Summary

Extends the "150+ Python Interview Questions" reference (readme.md) with five
new advanced questions (151–155) that "go deeper" into CPython internals and
modern concurrency — continuing the threads already running through the document.

What changed

  • Added 5 entries to the Table of Contents (with correct GitHub heading anchors).
  • Added 5 full question + answer sections at the end of the file.
  • Docs-only change: no code, config, or dependencies touched.

New questions

# Topic Builds on
151 Free-threaded Python (PEP 703, no-GIL) & subinterpreters (PEP 684/734) GIL: Q1, Q2, Q23, Q119
152 Bytecode execution: dis, ceval loop, frames, PEP 659 specializing interpreter Q85, Q86
153 CPython memory: pymalloc arenas/pools/blocks, tracemalloc, leaks & fragmentation Q11, Q90, Q115, Q135
154 Generators as coroutines (send/throw/close, yield from) → async/await Q36, Q37, Q118
155 Class customization without a metaclass: __init_subclass__, __set_name__, descriptors Q46, Q120, Q134

Style & consistency

  • Matches the existing format: bold key terms, cross-references to earlier questions,
    one illustrative code block per answer, and a closing takeaway.
  • ToC anchors verified against the GitHub slug format used throughout the file.
  • The # 150+ Python Interview Questions title already covers the higher count — no change needed.

Notes

  • Each answer ties back to this repo where relevant (FastAPI event loop, Celery workers,
    long-running-worker memory diagnosis) to keep it grounded in the codebase.

How to verify

  • Open readme.md, confirm ToC entries 151–155 link to their sections.
  • readme.md grows from 5777 → 5939 lines; no other files changed.

(CPython internals deep dive)" -m "Extend fixreadme.md with five advanced questions and matching ToC entries:
- 151: Free-threaded Python (PEP 703) and subinterpreters (PEP 684/734)
- 152: Bytecode execution, dis, ceval loop, frames, PEP 659 specializing interpreter
- 153: pymalloc arenas/pools/blocks, tracemalloc, diagnosing leaks and fragmentation
- 154: Generators as coroutines (send/throw/close, yield from) and async/await
- 155: __init_subclass__, __set_name__, and the descriptor protocol vs metaclasses
@ahmadalwareh
ahmadalwareh merged commit f72c4e3 into main Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant