1354
1355async def callback_monitor(context: ContextTypes.DEFAULT_TYPE):
1356 logger.debug(f"EXECUTOR pending work items: {len(EXECUTOR._pending_work_items)} tasks remain")
1357 EXECUTOR_TASKS_REMAINING.set(len(EXECUTOR._pending_work_items))1358
1359
1360def main():
1353
1354
1355async def callback_monitor(context: ContextTypes.DEFAULT_TYPE):
1356 logger.debug(f"EXECUTOR pending work items: {len(EXECUTOR._pending_work_items)} tasks remain")1357 EXECUTOR_TASKS_REMAINING.set(len(EXECUTOR._pending_work_items))
1358
1359
Accessing a protected member (a member prefixed with _
) of a class from outside that class is not recommended, since the creator of that class did not intend this member to be exposed. If accesing this attribute outside of the class is absolutely needed, refactor it such that it becomes part of the public interface of the class.
class Rectangle(object):
def __init__(self, height, width):
self._height = height
self._width = width
r = Rectangle(4, 8)
area = r._height * r._width
class Rectangle(object):
def __init__(self, height, width):
self._height = height
self._width = width
def area():
return self._height * self._width
r = Rectangle(4, 8)
area = r.area()