Re: Problems with "Tarfile.close()"

2019-12-20 Thread Ethan Furman
On 12/20/2019 04:19 AM, Dr Rainer Woitok wrote: One of my Python scripts basically does the following: source = tarfile.open(name=tar_archive , mode='r|*') dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt) . . . source.close() dest.close() In an attempt to move my

Re: Problems with "Tarfile.close()"

2019-12-20 Thread Chris Angelico
On Sat, Dec 21, 2019 at 2:29 AM Dr Rainer Woitok wrote: > > Greetings, > > One of my Python scripts basically does the following: > > source = tarfile.open(name=tar_archive , mode='r|*') > dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt) > > . > . > . > > source.close() >

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread ctarn
ctarn added the comment: OK, I mean... when I call `a = list(b)`, list() changes `b` unexpectedly, not `a != b` in this case. That is why I replace the left operand with `_`. -- ___ Python tracker

Re: Unable to install "collect" via pip3

2019-12-20 Thread Chris Angelico
On Sat, Dec 21, 2019 at 2:25 AM Mahmood Naderan via Python-list wrote: > > Hi > > I can install collect with pip for python2.7 > $ pip install --user collect > However, pip3 fails with this error > $ pip3 install --user collect > NameError: name 'file' is not defined > > I can not figure out

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread ctarn
ctarn added the comment: I printed the value of *.owner before and after `_ = list(d...)`, and marked the results in the comments. -- ___ Python tracker ___

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread ctarn
ctarn added the comment: Hi, thanks. It did call `list()` through `_ = list(d[0:2])` -- ___ Python tracker ___ ___

Problems with "Tarfile.close()"

2019-12-20 Thread Dr Rainer Woitok
Greetings, One of my Python scripts basically does the following: source = tarfile.open(name=tar_archive , mode='r|*') dest = tarfile.open(fileobj=sys.stdout, mode='w|', format=fmt) . . . source.close() dest.close() In an attempt to move my Python scripts from Python 2.7 to Python 3.6

Unable to install "collect" via pip3

2019-12-20 Thread Mahmood Naderan via Python-list
Hi I can install collect with pip for python2.7 $ pip install --user collect Collecting collect Using cached https://files.pythonhosted.org/packages/cf/5e/c0f0f51d081665374a2c219ea4ba23fb1e179b70dded96dc16606786d828/collect-0.1.1.tar.gz Collecting

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: Can you give an example? Something simple, showing what you tried, what you expected, and what happened instead. This may help: http://sscce.org/ Your bug.py file doesn't ever use the result of calling list(), so how do you know it changes the value of

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread ctarn
ctarn added the comment: In the code, each item of ls = [[0], [1], [2],...] has an owner pointing to d, which is a Tree inheriting from collections.UserList. When `d[0] = a`, and `a.owner = d`, and `_ = list(d[0:1])` is called, a.owner will be changed to d[0:1]. --

[issue39110] It seems that list() changes the value of the parameter

2019-12-20 Thread ctarn
Change by ctarn : -- title: It seems that unittest.TestCase.assertListEqual changes the value of its parameters -> It seems that list() changes the value of the parameter Added file: https://bugs.python.org/file48797/bug.py ___ Python tracker

[issue39110] It seems that unittest.TestCase.assertListEqual changes the value of its parameters

2019-12-20 Thread ctarn
Change by ctarn : Removed file: https://bugs.python.org/file48796/bug.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39110] It seems that unittest.TestCase.assertListEqual changes the value of its parameters

2019-12-20 Thread ctarn
New submission from ctarn : Sorry, it is caused by list(). I will update the issue very soon. -- nosy: +ctarn ___ Python tracker ___

[issue39110] It seems that unittest.TestCase.assertListEqual changes the value of its parameters

2019-12-20 Thread ctarn
Change by ctarn : -- title: It seems that TestCase.assertListEqual change the value of its parameters -> It seems that unittest.TestCase.assertListEqual changes the value of its parameters ___ Python tracker

[issue39110] It seems that TestCase.assertListEqual change the value of its parameters

2019-12-20 Thread ctarn
Change by ctarn : -- nosy: -ctarn title: It -> It seems that TestCase.assertListEqual change the value of its parameters versions: +Python 3.8 ___ Python tracker ___

[issue39110] It

2019-12-20 Thread ctarn
Change by ctarn : -- files: bug.py nosy: ctarn priority: normal severity: normal status: open title: It type: behavior Added file: https://bugs.python.org/file48796/bug.py ___ Python tracker

Re: [HN] How to Make Python Wait

2019-12-20 Thread Abdur-Rahmaan Janhangeer
Original from miguel grinberg -- https://mail.python.org/mailman/listinfo/python-list

Re: [HN] How to Make Python Wait

2019-12-20 Thread Chris Angelico
On Fri, Dec 20, 2019 at 11:16 PM Pankaj Jangid wrote: > > https://news.ycombinator.com/item?id=21834408 > > Did you just post a blog article, then spam everywhere to try to get traffic, where your entire blog post is telling people worse ways to do a time.sleep()? ChrisA --

[issue39094] Add a default to statistics.mean and related functions

2019-12-20 Thread Yoni Lavi
Yoni Lavi added the comment: Thanks for the good feedback everyone and apologies for the unresponsiveness over the past day. I understand that my use cases may not reflect wider usage patterns and am not looking to argue against the closing. But anyway, for future reference, I'll add two

[issue39109] [C-API] PyUnicode_FromString

2019-12-20 Thread STINNER Victor
STINNER Victor added the comment: > I think the ob_refcnt Field should be 1 in both cases. Or why is the refcnt > here so high? Python has singletons for short strings: empty string and 1-character latin1 characters (unicode range [U+; U+00FF]). Examples: >>> sys.getrefcount("") 103

[issue39109] [C-API] PyUnicode_FromString

2019-12-20 Thread Yannick
New submission from Yannick : Python version: 3.5 Tested with VS Studio 2017 in an C-API extension. When you have a UTF-8 encoded char buffer which is filled with a 0 or empty, and you youse the PyUnicode_FromString() method on this buffer, you will get a PyObject*. The content looks good,

[issue39107] Consider building Tkinter with Tk 8.6.10

2019-12-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned is aware of this and needs to verify that it works with _tkinter and tkinter on multiple versions of macOS. -- assignee: terry.reedy -> ned.deily components: +macOS -IDLE nosy: +ronaldoussoren ___ Python

[HN] How to Make Python Wait

2019-12-20 Thread Pankaj Jangid
https://news.ycombinator.com/item?id=21834408 -- https://mail.python.org/mailman/listinfo/python-list

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-12-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows with 8.6.9, I see '\U0001f4bb' on 3.7.5 and '' on 3.8.0 and 3.9.0a0. I don't know why the difference as Serhiy's patch was backported. I will upgrade 3.7 and 3.8 and try again. -- ___ Python tracker

[issue39107] Consider building Tkinter with Tk 8.6.10

2019-12-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39108] Documentation for "random.gauss" vs "random.normalvariate" is lacking

2019-12-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39108] Documentation for "random.gauss" vs "random.normalvariate" is lacking

2019-12-20 Thread Charles Newey
New submission from Charles Newey : The Python 3 documentation for the "random" module mentions two possible ways to generate a random variate drawn from a normal distribution - "random.gauss" and "random.normalvariate" (see: https://docs.python.org/3/library/random.html#random.gauss). It's

[issue39107] Consider building Tkinter with Tk 8.6.10

2019-12-20 Thread Aivar Annamaa
Change by Aivar Annamaa : -- title: Consider upgrading Tkinter to Tk 8.6.10 -> Consider building Tkinter with Tk 8.6.10 ___ Python tracker ___

[issue39107] Consider upgrading Tkinter to Tk 8.6.10

2019-12-20 Thread Aivar Annamaa
Change by Aivar Annamaa : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___ ___

[issue39107] Consider upgrading Tkinter to Tk 8.6.10

2019-12-20 Thread Aivar Annamaa
New submission from Aivar Annamaa : It includes several Mac-related enhancements https://sourceforge.net/projects/tcl/files/Tcl/8.6.10/tcltk-release-notes-8.6.10.txt/view -- components: Tkinter messages: 358702 nosy: Aivar.Annamaa priority: normal severity: normal status: open title:

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-12-20 Thread Aivar Annamaa
Aivar Annamaa added the comment: >>> '\N{PERSONAL COMPUTER}' freezes IDLE 3.7.6 (64-bit, downloaded from python.org) on macOS 10.15 Can it be because Tk 8.6.8 is still used there? -- nosy: +Aivar.Annamaa ___ Python tracker

[issue39094] Add a default to statistics.mean and related functions

2019-12-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: I agree with Raymond's comments, except that because I'm sometimes a bit of a pedant, I have to make one minor correction: max and min can be descriptive statistics. The sample minimum is the 1st order statistic, and the sample maximum is the N-th order

[issue39097] The description of multiprocessing.cpu_count() is not accurate in the documentation

2019-12-20 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39106] Add suggestions to argparse error message output for unrecognized arguments

2019-12-20 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I came across this idea while working on error messages for click at https://github.com/pallets/click/issues/1446. Currently for unknown arguments which could in some case be typos argparse throws an error but doesn't make any suggestions. It

<    1   2