[name] asked: How much data will be returned and how many requests will be made to the database for this code?
Python
[name] asked: Tell me about the libraries multiprocessing, threading, and asyncio — have you used them?
[name] asked: Is it correct that nonlocal allows an inner function to access a variable from an outer function?
[name] asked: How does memory management work in Python (garbage collector, reference counting)?
[name] asked: Why is GIL needed in Python, and what are the ways to run Python in parallel?
[name] asked: Do you know what a context manager is? Have you written one manually, and for what purpose?
[name] asked: If the call count information is stored in a closure via nonlocal, how can I find out outside how many times a specific function (e.g., a) was called?
Can a list be used as a dictionary key in Python?
[name] asked: Is it possible to access wrapper.calls both after defining the function def wrapper and inside the wrapper's body itself?
[name] asked: What will be the values of the counter (count) for functions a and b after a single call to each?
telecast_qs = Telecast.objects.all()[:10] {% for telecast in telecast_qs %} <div> {{ telecast.title }} by {{ telecast.tv_channel.title }} </div> {% endfor %}
[name] asked: Tell me about iterators and generators in Python — what is the difference and when to use what?
Write a decorator that counts the number of calls to decorated functions.
-- Write a query that returns channels with >= 2 TV programs -- Write a query that returns channels with 0 TV programs -- Write a query that outputs for each TV channel -- its name and its last program in the database
What is the data type of function arguments (*args and **kwargs) in Python?
[name] asked: What is the difference between EXPLAIN and EXPLAIN ANALYZE in PostgreSQL, and what should be looked at when comparing the plans of two queries (whether an index is used, etc.)?
-- Write a query that returns channels with 0 TV broadcasts
[name] asked: On which other programming languages have you written, and what key features of Python can be highlighted when comparing with other languages (e.g., interpretability)?
[name] asked: How many queries would be executed in the database if using select_related, and how many if using prefetch_related?
[name] asked: Explain how ORDER BY works here — the one used inside the window function OVER, is it different from the overall query execution order?