bpo-25066: Added repr for multiprocessing.Event (GH-29749)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Kumar Aditya 2021-12-09 18:46:45 +05:30 committed by GitHub
parent e2cfc89e09
commit af6b406885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -353,6 +353,9 @@ class Event(object):
return True
return False
def __repr__(self) -> str:
set_status = 'set' if self.is_set() else 'unset'
return f"<{type(self).__qualname__} at {id(self):#x} {set_status}>"
#
# Barrier
#