Re: [Python-Dev] Change in Python 3's "round" behavior

2018-09-29 Thread Greg Ewing
I don't really get the statistical argument. If you're doing something like calculating an average and care about accuracy, why are you rounding the values before averaging? Why not average first and then round the result if you need to? -- Greg ___ Py

Re: [Python-Dev] Change in Python 3's "round" behavior

2018-09-29 Thread Alex Walters
> -Original Message- > From: Python-Dev list=sdamon@python.org> On Behalf Of Steven D'Aprano > Sent: Thursday, September 27, 2018 9:54 AM > To: python-dev@python.org > Subject: Re: [Python-Dev] Change in Python 3's "round" behavior > > On Thu, Sep 27, 2018 at 05:55:07PM +1200, Greg

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Michael Selik
On Sat, Sep 29, 2018 at 5:24 AM Sean Harrington wrote: >> On Fri, Sep 28, 2018 at 4:39 PM Sean Harrington wrote: >> > My simple argument is that the developer should not be constrained to make >> > the objects passed globally available in the process, as this MAY break >> > encapsulation for la

Re: [Python-Dev] What is the purpose of the _PyThreadState_Current symbol in Python 3?

2018-09-29 Thread Gabriele
Ah ok, this might be related to Victor's observation based on the latest sources. I haven't tested 3.7 yet, but if _PyRuntime is available from dynsym then this is already enough. Thanks, Gabriele On Sat, 29 Sep 2018 at 11:00, Nathaniel Smith wrote: > > On Fri, Sep 28, 2018 at 3:29 PM, Gabriele

Re: [Python-Dev] switch statement

2018-09-29 Thread Steven D'Aprano
On Fri, Sep 21, 2018 at 02:10:00PM -0700, Guido van Rossum wrote: > There's already a rejected PEP about a switch statement: > https://www.python.org/dev/peps/pep-3103/. There's no point bringing this > up again unless you have a new use case. > > There have been several promising posts to python-

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Sean Harrington
On Sat, Sep 29, 2018 at 8:18 AM Antoine Pitrou wrote: > On Sat, 29 Sep 2018 08:13:19 -0400 > Sean Harrington wrote: > > > > > > Hmm... We might have a disagreement on the target audience of the > > > multiprocessing module. multiprocessing isn't very high-level, I would > > > expect it to be u

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Sean Harrington
On Fri, Sep 28, 2018 at 9:27 PM Michael Selik wrote: > On Fri, Sep 28, 2018 at 2:11 PM Sean Harrington > wrote: > > kwarg on Pool.__init__ called `expect_initret`, that defaults to False. > When set to True: > > Capture the return value of the initializer kwarg of Pool > > Pass this value to the

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Antoine Pitrou
On Sat, 29 Sep 2018 08:13:19 -0400 Sean Harrington wrote: > > > > Hmm... We might have a disagreement on the target audience of the > > multiprocessing module. multiprocessing isn't very high-level, I would > > expect it to be used by experienced programmers who know how to mutate > > a global v

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Sean Harrington
On Sat, Sep 29, 2018 at 6:24 AM Antoine Pitrou wrote: > > Hi Sean, > > On Fri, 28 Sep 2018 19:23:06 -0400 > Sean Harrington wrote: > > My simple argument is that the > > developer should not be constrained to make the objects passed globally > > available in the process, as this MAY break encaps

Re: [Python-Dev] bpo-34837: Multiprocessing.Pool API Extension - Pass Data to Workers w/o Globals

2018-09-29 Thread Antoine Pitrou
Hi Sean, On Fri, 28 Sep 2018 19:23:06 -0400 Sean Harrington wrote: > My simple argument is that the > developer should not be constrained to make the objects passed globally > available in the process, as this MAY break encapsulation for large > projects. IMHO, global variables don't break enc

Re: [Python-Dev] What is the purpose of the _PyThreadState_Current symbol in Python 3?

2018-09-29 Thread Nathaniel Smith
On Fri, Sep 28, 2018 at 3:29 PM, Gabriele wrote: > On Fri, 28 Sep 2018 at 23:12, Nathaniel Smith wrote: >> What information do you wish the interpreter provided, that would make your >> program simpler and more reliable? > > An exported global variable that points to the head of the > PyInterpre

Re: [Python-Dev] Change in Python 3's "round" behavior

2018-09-29 Thread Stephen J. Turnbull
Greg Ewing writes: > (BTW, how do you provide a citation for "common knowledge"?-) Aumann, Robert J. [1976], "Agreeing to Disagree." Annals of Statistics 4, pp. 1236-1239 is what I usually use. :-) ___ Python-Dev mailing list Python-Dev@python.org h