mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Perfomance optimizations
Using `or` instead of `|`
This commit is contained in:
parent
d0f6860bac
commit
5b1252ac2d
1 changed files with 4 additions and 3 deletions
|
@ -272,9 +272,10 @@ class Filters(object):
|
|||
pinned_message = _PinnedMessage()
|
||||
|
||||
def filter(self, message):
|
||||
return (self.new_chat_members | self.left_chat_member | self.new_chat_title |
|
||||
self.new_chat_photo | self.delete_chat_photo | self.chat_created |
|
||||
self.migrate | self.pinned_message)(message)
|
||||
return bool(self.new_chat_members(message) or self.left_chat_member(message) or
|
||||
self.new_chat_title(message) or self.new_chat_photo(message) or
|
||||
self.delete_chat_photo(message) or self.chat_created(message) or
|
||||
self.migrate(message) or self.pinned_message(message))
|
||||
|
||||
status_update = _StatusUpdate()
|
||||
|
||||
|
|
Loading…
Reference in a new issue