[issue46876] Walrus operator not in help
New submission from Mohammad Mahdi Zojaji Monfared : Walrus oprator := not in help("symbols") and help(":=") does not work. -- components: Interpreter Core files: walrus.png messages: 414168 nosy: mmahdizojajim priority: normal severity: normal status: open title: Walrus operator not in help type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50651/walrus.png ___ Python tracker <https://bugs.python.org/issue46876> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46326] 'venv --clear' should prompt user before nuking entire directory
Change by Ali Mohammad Pur : -- title: 'virtualenv --clear' should prompt user before nuking entire directory -> 'venv --clear' should prompt user before nuking entire directory ___ Python tracker <https://bugs.python.org/issue46326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory
Ali Mohammad Pur added the comment: > If similar behavior is also an issue with the Python standard library venv > module (which is a derivative of virtualenv), please update this issue > accordingly Yes, my bad, I should have mentioned that this applies to venv, I will update the issue title. Not sure if I can modify my earlier comment however (I don't see any way to). -- ___ Python tracker <https://bugs.python.org/issue46326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46326] 'virtualenv --clear' should prompt user before nuking entire directory
New submission from Ali Mohammad Pur : `virtualenv --clear` is extremely eager to delete the passed directory without any sort of confirmation, leading to possible data-loss (e.g. with a mistyped command, or a misunderstanding of what it actually does). Simply deleting an entire directory tree with a command that's extremely prone to misunderstanding should not be virtualenv's job, but as it has decided to make this its job, then it should take proper precautions to avoid unintentional `rm -fr some-directory` by *at least* asking for confirmation. The previous behaviour can of course, stay behind a `--force` flag for uses in CI or similar, but this should *not* be the default behaviour. related: https://github.com/pypa/virtualenv/issues/1890 mentions that "[it is not] good practice to put non-virtual environment-related files into a virtual environment", which is sensible, and so virtualenv should then simply refuse to be instantiated in a non-empty directory. On a more subjetive note, `virtualenv --clear ` sounds like a way to purge the virtual environment files from a directory (yes, I understand what the help says, but that hardly changes anything), so perhaps a more verbose flag like "--clear-contents" would be more appropriate, but I digress. -- messages: 410192 nosy: alimpfard priority: normal severity: normal status: open title: 'virtualenv --clear' should prompt user before nuking entire directory type: behavior ___ Python tracker <https://bugs.python.org/issue46326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45752] copy module doc wrongly says it doesn't copy arrays
Change by Mohammad Mostafa Farzan : -- pull_requests: +27804 pull_request: https://github.com/python/cpython/pull/29556 ___ Python tracker <https://bugs.python.org/issue45752> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45752] copy module doc wrongly says it doesn't copy arrays
Change by Mohammad Mostafa Farzan : -- keywords: +patch nosy: +m2_farzan nosy_count: 4.0 -> 5.0 pull_requests: +27797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29548 ___ Python tracker <https://bugs.python.org/issue45752> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42511] string in string not working
New submission from Mohammad Sadra Sharifzadeh : I want to know whether some string is in same string or not (yeah the SAME) in the file attached I have two expressions: 1- print('اندیمشک' in 'اندیمشک') 2- print('اندیمشک' in 'اندیمشک') as you can see both of them are same thing but if you run the program you see it returns True for first one and False for second one. the difference between two expressions is that in the first one I typed both of the strings but in the second one I copied second string from a file and type first string Thanks -- files: string bug.py messages: 382140 nosy: m.s.sharifzade priority: normal severity: normal status: open title: string in string not working type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49638/string bug.py ___ Python tracker <https://bugs.python.org/issue42511> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41776] Revise example of "continue" in the tutorial documentation
New submission from AmirHossein Haji Mohammad Sadegh : It's not wrong but in the example for "continue" in the tutorial, the code prints "Found an even number" for even numbers and "Found a number" for odd numbers. Maybe it would be better if we print "Found an odd number" for odd numbers. Like this: for num in range(2, 10): if num % 2 == 0: print("Found an even number", num) continue print("Found an odd number", num) Found an even number 2 Found an odd number 3 Found an even number 4 Found an odd number 5 Found an even number 6 Found an odd number 7 Found an even number 8 Found an odd number 9 -- assignee: docs@python components: Documentation messages: 376834 nosy: amirrossein, docs@python priority: normal severity: normal status: open title: Revise example of "continue" in the tutorial documentation type: performance ___ Python tracker <https://bugs.python.org/issue41776> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points))
Mohammad Dehghan added the comment: I submitted a PR for this: https://github.com/python/cpython/pull/16016 -- ___ Python tracker <https://bugs.python.org/issue38130> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points))
New submission from Mohammad Dehghan : In section 8.6 of the tutorials page (https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions), the first item of the bullet points explaining some situations about finally clause, states that > If an exception occurs during execution of the try clause, the exception may > be handled by an except clause. **In all cases, the exception is re-raised > after the finally clause has been executed.** This is wrong, since the exception is not re-raised if an `except` clause handles the exception. -- nosy: -docs@python ___ Python tracker <https://bugs.python.org/issue38130> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points))
Change by Mohammad Dehghan : -- assignee: docs@python components: Documentation nosy: Mohammad Dehghan, docs@python priority: normal severity: normal status: open title: Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38130> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3687] Popen() object stdout attribute reassignment behaviour
Mohammad Maaz Khan added the comment: Hi, I want to update the doc for this. This will be my first attempt to update the documentation. -- nosy: +maaz92 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3687> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16026] csv.DictReader argument names documented incorrectly
Mohammad Maaz Khan added the comment: Hi Éric, I think the documentation should be changed to match the arguments' names. -- nosy: +maaz92 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16026> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27878] Unicode word boundries
New submission from mohammad aghanabi: According to [UAX #29](http://unicode.org/reports/tr29) - unicode word boundaries (rule WB5a), an apostrophe includes U+0027 ( ' ) APOSTROPHE and U+2019 ( ’ ) RIGHT SINGLE QUOTATION MARK (curly apostrophe). However regex module only implements U+0027 and the second kind (U+2019) is missing: /* Break between apostrophe and vowels (French, Italian). */ /* WB5a */ if (pos_m1 >= 0 && char_at(state->text, pos_m1) == '\'' && is_unicode_vowel(char_at(state->text, text_pos))) return TRUE; [Source code](https://bitbucket.org/mrabarnett/mrab-regex/src/f21447bf288780d8dd9b1633820480484ce8f677/regex_3/regex/_regex.c?at=default=file-view-default#_regex.c-1657) -- components: Regular Expressions messages: 273782 nosy: ezio.melotti, mohammad aghanabi, mrabarnett priority: normal severity: normal status: open title: Unicode word boundries type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue27878> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17470] random.choice should accept a set as input
New submission from Mohammad Akram: I think the random.choice function should support sets. The random.sample function already supports sets and therefore the API should be consistent in this regard. This is how it's done in the sample method (line 295): if isinstance(population, _Set): population = tuple(population) -- components: Library (Lib) messages: 184532 nosy: Mohammad.Akram priority: normal severity: normal status: open title: random.choice should accept a set as input type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7496] python does not work in command prompt
New submission from mohammad mohammad.madan...@gmail.com: when i type python in my command promp this message is shown : C:\Documents and Settings\Xpython Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: cp720 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. what's the problem ?! -- components: Windows messages: 96351 nosy: memol_jpn severity: normal status: open title: python does not work in command prompt type: crash versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4749] Issue with RotatingFileHandler logging handler on Windows
New submission from Mohammad Al mramah...@hotmail.com: It seems that RotatingFileHandler is experiencing an issue when attempting to rotate log files under Windows. The following errors are received: Traceback (most recent call last): File C:\Python25\lib\logging\handlers.py, line 73, in emit if self.shouldRollover(record): File C:\Python25\lib\logging\handlers.py, line 147, in shouldRollover self.stream.seek(0, 2) #due to non-posix-compliant Windows feature ValueError: I/O operation on closed file Traceback (most recent call last): File C:\Python25\lib\logging\handlers.py, line 73, in emit if self.shouldRollover(record): I tried the code on Python 2.5.2 and 2.5.4 under Windows XP SP 2, with the same results. To reproduce run the attached scripts few times. The first time the handlers attempt to rotate the log files the error message above is received. In addition to crashing the application, log files are getting lost as a result, which is a serious issue. I have seen few complaints about this issue, but tickets were closed without a real resolution to the issue (unless I missed something) -- components: Library (Lib) files: rothandlerbug.py messages: 78293 nosy: mramahi77 severity: normal status: open title: Issue with RotatingFileHandler logging handler on Windows type: crash versions: Python 2.4, Python 2.5 Added file: http://bugs.python.org/file12449/rothandlerbug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com