Re: Lifetime of a local reference

2019-02-28 Thread Chris Angelico
On Fri, Mar 1, 2019 at 9:31 AM Marko Rauhamaa wrote: > > Roel Schroeven : > > In the absence of any other mention of bindings being removed, to me > > it seems clear that bindings are not automatically removed. Otherwise > > many things become ambiguous. Example: the documentation for dicts > > de

Re: Lifetime of a local reference

2019-02-28 Thread Marko Rauhamaa
Roel Schroeven : > In the absence of any other mention of bindings being removed, to me > it seems clear that bindings are not automatically removed. Otherwise > many things become ambiguous. Example: the documentation for dicts > defines "d[key] = value" as "Set d[key] to value". Does that mean it

Re: dash/underscore on name of package uploaded on pypi

2019-02-28 Thread Terry Reedy
On 2/28/2019 11:09 AM, ast wrote: Hello I just uploaded a package on pypi, whose name is "arith_lib" The strange thing is that on pypi the package is renamed "arith-lib" The underscore is substitued with a dash If we search for this package: pip search arith arith-lib (2.0.0) - A set of func

Re: Need help with Python3.4 and Avro

2019-02-28 Thread Terry Reedy
On 2/28/2019 11:19 AM, Mihir Kothari wrote: I am not sure if this is the right list, but trying to get help from experienced python users for my issue. This is a good place to get a somewhat different set of such people. I have posted the issue in stackoverflow, but yet to see any response.

Re: Lifetime of a local reference

2019-02-28 Thread Roel Schroeven
Rhodri James schreef op 28/02/2019 om 13:09: On 27/02/2019 21:39, Roel Schroeven wrote: Rhodri James schreef op 27/02/2019 om 15:18: Aren't we overthinking this? I think it's pretty clear that a variable is never deleted before it goes out of scope. A quick search in the documentation points me

Need help with Python3.4 and Avro

2019-02-28 Thread Mihir Kothari
Hi, I am not sure if this is the right list, but trying to get help from experienced python users for my issue. I have posted the issue in stackoverflow, but yet to see any response. I am trying my luck here. I have my question here: https://stackoverflow.com/q/54833834/3165644 If needed, I can

Re: dash/underscore on name of package uploaded on pypi

2019-02-28 Thread Paul Moore
On Thu, 28 Feb 2019 at 16:14, ast wrote: > > Hello > > I just uploaded a package on pypi, whose name is "arith_lib" > > The strange thing is that on pypi the package is renamed "arith-lib" > The underscore is substitued with a dash The version with a dash is the normalised form of the name - see

Re: Using PyArg_ParseTuple to with optional fields.

2019-02-28 Thread DL Neil
Anthony, On 28/02/19 10:18 PM, Anthony Flury via Python-list wrote: I am trying to write an extension module with a function (actually an __init__ method, but I am not sure that matters) where the function can be called as either :     my_func() or     my_func( a, b, c, d) - where a,b,c,d a

dash/underscore on name of package uploaded on pypi

2019-02-28 Thread ast
Hello I just uploaded a package on pypi, whose name is "arith_lib" The strange thing is that on pypi the package is renamed "arith-lib" The underscore is substitued with a dash If we search for this package: pip search arith arith-lib (2.0.0) - A set of functions for miscellaneous arithmetic

Embedding Python (3.7) on OSX crash on Py_Initialize when run as bundle

2019-02-28 Thread Arnaud Loonstra
Hi, I'm trying to wrap my head around an OSX app which has python embedded. This works fine if I run the build on the same machine as it is build on. However when using Travis to build the app I can only get it to run from the terminal. A double click on the appdir (or using open) results in

Re: Lifetime of a local reference

2019-02-28 Thread Marko Rauhamaa
Chris Angelico : > What if an exception gets raised at some point before the function has > returned? The exception object will give full access to the function's > locals. It wouldn't hurt for the Python gods to make an explicit ruling on the matter. Marko -- https://mail.python.org/mailman/li

Re: Lifetime of a local reference

2019-02-28 Thread Chris Angelico
On Thu, Feb 28, 2019 at 11:13 PM Rhodri James wrote: > > On 27/02/2019 21:39, Roel Schroeven wrote: > > Rhodri James schreef op 27/02/2019 om 15:18: > > Aren't we overthinking this? > > > > I think it's pretty clear that a variable is never deleted before it > > goes out of scope. A quick search i

Re: Lifetime of a local reference

2019-02-28 Thread Rhodri James
On 27/02/2019 21:39, Roel Schroeven wrote: Rhodri James schreef op 27/02/2019 om 15:18: Aren't we overthinking this? I think it's pretty clear that a variable is never deleted before it goes out of scope. A quick search in the documentation points me to (https://docs.python.org/3/reference/dat

Re: Using PyArg_ParseTuple to with optional fields.

2019-02-28 Thread Stefan Behnel
Anthony Flury via Python-list schrieb am 28.02.19 um 10:18: > I am trying to write an extension module with a function (actually an > __init__ method, but I am not sure that matters) where the function can be > called as either : > >     my_func() > > or > >     my_func( a, b, c, d) - where a,b,

Using PyArg_ParseTuple to with optional fields.

2019-02-28 Thread Anthony Flury via Python-list
I am trying to write an extension module with a function (actually an __init__ method, but I am not sure that matters) where the function can be called as either :     my_func() or     my_func( a, b, c, d) - where a,b,c,d are all doubles. I would prefer not to allow the function to be called

Re: Lifetime of a local reference

2019-02-28 Thread Marko Rauhamaa
Alan Bawden : > Gregory Ewing writes: > >> Alan Bawden wrote: >> > the Java Language >> > Specification contains the following language: >> >Optimizing transformations of a program can be designed that reduce >> >the number of objects that are reachable to be less than those which >> >