[issue43491] Windows filepath bug
parsa mpsh added the comment: Yes. i checked it more. looks problem was from other thing, not the path. -- ___ Python tracker <https://bugs.python.org/issue43491> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43491] Windows filepath bug
Change by parsa mpsh : -- components: +IO ___ Python tracker <https://bugs.python.org/issue43491> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43491] Windows filepath bug
parsa mpsh added the comment: I think this bug should be fixed by converting all of `/`s to `\` in file paths automatic **When os is windows**. -- ___ Python tracker <https://bugs.python.org/issue43491> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43491] Windows filepath bug
parsa mpsh added the comment: Update: i only tested this bug in `3.6` and `3.7` i'm not sure about newer versions. but i think this bug also is in them. -- ___ Python tracker <https://bugs.python.org/issue43491> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43491] Windows filepath bug
New submission from parsa mpsh : I was testing my program in github workflow and i detected a bug. i was opening a file in windows: ``` f = open(os.path.dirname(__FILE__) + '/some/file.txt') ``` means the file path will be `C:\some\path/some/file.txt`. but i received OSError. why? because in the above path, we have both `/` and `\`. I think this bug should be fixed by converting all of `/`s to `\` in file paths automatic. -- components: Windows messages: 388672 nosy: parsampsh, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows filepath bug type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43491> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43432] Add function `clear` to the `os` module
parsa mpsh added the comment: Well, some times we are writing a flexible Text ui program. we may use `clear` lot of times. This should be used when we haven't any valuable data on the screen. Also, who that uses this function, knows this will clear valuable data :). Sometimes also i use this command. but every time a should check that is this operation windows or not, to determine `clear` or `cls`. I think this is very helpful for making this easier. The best feature of Python is its simplicity and power. More helper functions to make the code shorter and knowable, is a good thing for Python. Also about the Windows API instead of `cls`, i don't know more thing. But i think its not a big problem and `cls` works. -- ___ Python tracker <https://bugs.python.org/issue43432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43432] Add function `clear` to the `os` module
Change by parsa mpsh : -- keywords: +patch pull_requests: +23550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24784 ___ Python tracker <https://bugs.python.org/issue43432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43432] Add function `clear` to the `os` module
New submission from parsa mpsh : I wanna add a new function named `clear` to the os module. This function runs the `clear` command in the os. but this function checks that is os windows, if yes, runs `cls`. I'm working on my patch. -- components: Library (Lib) messages: 388262 nosy: parsampsh priority: normal severity: normal status: open title: Add function `clear` to the `os` module type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43276] add `false` and `true` keywords (aliases) for True and False
parsa mpsh added the comment: I sent a PR: https://github.com/python/cpython/pull/24600 -- ___ Python tracker <https://bugs.python.org/issue43276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43276] add `false` and `true` keywords (aliases) for True and False
Change by parsa mpsh : -- pull_requests: +23378 pull_request: https://github.com/python/cpython/pull/24600 ___ Python tracker <https://bugs.python.org/issue43276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43276] add `false` and `true` keywords (aliases) for True and False
parsa mpsh added the comment: Also adding them as builtin keywords will make it easier than setting them as variables. in this method, we should define them everywhere, but in builtin type its easy. -- ___ Python tracker <https://bugs.python.org/issue43276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43276] add `false` and `true` keywords (aliases) for True and False
parsa mpsh added the comment: Yes i know this. but why not adding this builtin? this will be very nice! -- ___ Python tracker <https://bugs.python.org/issue43276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43276] add `false` and `true` keywords (aliases) for True and False
New submission from parsa mpsh : I wanna add `true` and `false` aliases for `True` and `False` keywords. Currently my patch is ready and i will send it as a pull request. -- messages: 387411 nosy: parsampsh priority: normal severity: normal status: open title: add `false` and `true` keywords (aliases) for True and False type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43276> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42503] Cannot declare method or static function parameter or return type as self of the class
New submission from parsa mpsh : python raises error `Undefined class X` when you declaring parameter type or return type of method as the self of class: class MyClass: def mymethod(self, a: MyClass): # parameter type is class self pass # or class MyClass: def mymethod(self) -> MyClass: # return type is class self pass # or both of them error `Undefined class ...` will be raised. -- messages: 382061 nosy: parsampsh priority: normal severity: normal status: open title: Cannot declare method or static function parameter or return type as self of the class type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42503> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com