New GitHub issue #110965 from Just1truc:<br>
<hr>
<pre>
# Feature or enhancement
### Proposal:
I hereby propose the keyword ``when``
This keyword has appeared to me as a good feature to simplify the process of creating and handling events in python. It would be **much** easier for newcomers to create a program with event using this keyword.
Here's an example of how it has be used:
```python
# Add a code block here, if required
from time import sleep
i = 0
when i > 3:
print("i is now equal to 3")
print("Before i change")
sleep(2)
i = 3
print("After i changed")
```
```bash
Before i change
i is now equal to 3
After i changed
```
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/110965">View on GitHub</a>
<p>Labels: type-feature</p>
<p>Assignee: </p>