69
70 await asyncio.sleep(1)
71 # noinspection PyProtectedMember
72 response = await message._client.get_history(message.chat.id, limit=1) 73
74 interact_with_to_delete.append(message.message_id)
75 interact_with_to_delete.append(response[0].message_id)
59
60 await asyncio.sleep(1)
61 # noinspection PyProtectedMember
62 response = await message._client.get_history(message.chat.id, limit=1) 63 seconds_waiting = 0
64
65 while response[0].from_user.is_self:
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()