()
| 75 | pass |
| 76 | |
| 77 | def try_receive_email(): |
| 78 | # Returns an Email instance or raises NoEmailError |
| 79 | try: |
| 80 | email = next(EMAIL_IT) |
| 81 | except StopIteration: |
| 82 | email = None |
| 83 | |
| 84 | if not email: |
| 85 | raise NoEmailError |
| 86 | |
| 87 | print(f"Produced email: {email.message}") |
| 88 | return email |
| 89 | |
| 90 | |
| 91 | print("Example 3") |