Skip to content

Commit 5ed06df

Browse files
Eldinnietsnoam
authored andcommitted
callback query docstring (python-telegram-bot#749)
showed from instead of from_user and was missing the informational note about it. [ci skip]
1 parent eef1238 commit 5ed06df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

telegram/callbackquery.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ class CallbackQuery(TelegramObject):
3030
inline mode), the field :attr:`inline_message_id` will be present.
3131
3232
Note:
33+
* In Python `from` is a reserved word, use `from_user` instead.
3334
Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
3435
3536
Attributes:
3637
id (:obj:`str`): Unique identifier for this query.
37-
from (:class:`telegram.User`): Sender.
38+
from_user (:class:`telegram.User`): Sender.
3839
message (:class:`telegram.Message`): Optional. Message with the callback button that
3940
originated the query.
4041
inline_message_id (:obj:`str`): Optional. Identifier of the message sent via the bot in
@@ -46,7 +47,7 @@ class CallbackQuery(TelegramObject):
4647
4748
Args:
4849
id (:obj:`str`): Unique identifier for this query.
49-
from (:class:`telegram.User`): Sender.
50+
from_user (:class:`telegram.User`): Sender.
5051
message (:class:`telegram.Message`, optional): Message with the callback button that
5152
originated the query. Note that message content and message date will not be available
5253
if the message is too old.

0 commit comments

Comments
 (0)