[issue41935] Add binary operator!

2020-10-04 Thread Hadi Alqattan
New submission from Hadi Alqattan : What are your opinions about adding a binary operator to Python in order to make this code possible? ``` my_counter = 0 for i in rage(1000): my_counter += 1 if (i % 2) == 0 ``` -- components: Interpreter Core messages: 377976 nosy: hadialqattan

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
Hadi Alqattan added the comment: You're right, I'm sorry. -- ___ Python tracker <https://bugs.python.org/issue41934> ___ ___ Python-bugs-list mailing

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
Change by Hadi Alqattan : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue41934> ___ ___ Python-bugs-list

[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Hadi Alqattan
New submission from Hadi Alqattan : Adding a new method to `pathlib.Path` class, `has` method is a method that can determine if the `Path` object has a specific file/dir or not. Assume that we have a `Path` object for this `project/` directory: ``` project/ main.py __init__.py utils