Re: Py_BuildValue vs PyTuple_Pack vs PyTuple_New

2020-10-20 Thread Marco Sulla
Good, thank you a lot again. -- https://mail.python.org/mailman/listinfo/python-list

Re: Pickle in C does not work

2020-10-20 Thread Serhiy Storchaka
20.10.20 17:12, Marco Sulla пише: > On Tue, 20 Oct 2020 at 16:07, Serhiy Storchaka wrote: >> You can use PyDict_New() + PyDict_Merge() to create a dict from your >> mapping. > Well, yes, I know. I just wrote it for simplicity now. Do you think this is > the problem? I think that it can be more pe

Re: Py_BuildValue vs PyTuple_Pack vs PyTuple_New

2020-10-20 Thread Serhiy Storchaka
20.10.20 18:05, Marco Sulla пише: > I read these three C api functions, They are similar, because they all > construct a tuple[1]. > > IMHO, Py_BuildValue is more simple to use than PyTuple_Pack that is more > simple to use than PyTuple_New. > > Where to use one or the other? What's the relative

Py_BuildValue vs PyTuple_Pack vs PyTuple_New

2020-10-20 Thread Marco Sulla
I read these three C api functions, They are similar, because they all construct a tuple[1]. IMHO, Py_BuildValue is more simple to use than PyTuple_Pack that is more simple to use than PyTuple_New. Where to use one or the other? What's the relative performance of the three functions? [1] actuall

Re: Pickle in C does not work

2020-10-20 Thread Marco Sulla
On Tue, 20 Oct 2020 at 16:12, Marco Sulla wrote: > tp_name of your class should include the module name. >> > > It will be done :-) > It was the name... Thank you a lot! -- https://mail.python.org/mailman/listinfo/python-list

Re: Pickle in C does not work

2020-10-20 Thread Marco Sulla
On Tue, 20 Oct 2020 at 16:07, Serhiy Storchaka wrote: > You can use PyDict_New() + PyDict_Merge() to create a dict from your > mapping. > Well, yes, I know. I just wrote it for simplicity now. Do you think this is the problem? I forgot to say that copy and deepcopy works. For what I know, they u

Re: Pickle in C does not work

2020-10-20 Thread Serhiy Storchaka
20.10.20 01:28, Marco Sulla пише: > PyObject *d = PyObject_Call((PyObject *)&PyDict_Type, args, NULL); You can use PyDict_New() + PyDict_Merge() to create a dict from your mapping. > but I get: > _pickle.PicklingError: Can't pickle : attribute lookup > frozendict on builtins failed tp_name o

web conference on python

2020-10-20 Thread Agnese Camellini
Hello, i am not a staff member, but some connection on likeding asked me to share this link and i would be happy if it helps someone. https://python.geekle.us/? -- https://mail.python.org/mailman/listinfo/python-list

Re: Embedding version in command-line program

2020-10-20 Thread Loris Bennett
"Loris Bennett" writes: > Tony Flury writes: > >> On 07/10/2020 12:06, Loris Bennett wrote: >>> Hi, >>> >>> I have written a program, which I can run on the command-line thus >>> >>>mypyprog --version >>> >>> and the get the version, which is currently derived from a variable in >>> the main