Re: in a pickle

2019-03-06 Thread duncan smith
On 07/03/2019 00:18, Ethan Furman wrote: > On 03/06/2019 10:30 AM, duncan smith wrote: > >>  I've been trying to figure out why one of my classes can be >> pickled but not unpickled. (I realise the problem is probably with the >> pickling, but I get the error when I attempt to unpickle.) >> >> A r

Re: in a pickle

2019-03-06 Thread duncan smith
On 06/03/2019 20:24, Peter Otten wrote: > duncan smith wrote: > >> On 06/03/2019 16:14, duncan smith wrote: >>> Hello, >>> I've been trying to figure out why one of my classes can be >>> pickled but not unpickled. (I realise the problem is probably with the >>> pickling, but I get the error

Re: in a pickle

2019-03-06 Thread Ethan Furman
On 03/06/2019 10:30 AM, duncan smith wrote: I've been trying to figure out why one of my classes can be pickled but not unpickled. (I realise the problem is probably with the pickling, but I get the error when I attempt to unpickle.) A relatively minimal example is pasted below. --> import p

Re: in a pickle

2019-03-06 Thread Peter Otten
duncan smith wrote: > On 06/03/2019 16:14, duncan smith wrote: >> Hello, >> I've been trying to figure out why one of my classes can be >> pickled but not unpickled. (I realise the problem is probably with the >> pickling, but I get the error when I attempt to unpickle.) >> >> A relatively

Re: in a pickle

2019-03-06 Thread duncan smith
On 06/03/2019 16:14, duncan smith wrote: > Hello, > I've been trying to figure out why one of my classes can be > pickled but not unpickled. (I realise the problem is probably with the > pickling, but I get the error when I attempt to unpickle.) > > A relatively minimal example is pasted bel

RE: in a pickle

2019-03-06 Thread David Raymond
has no attribute 'shape' .loads() complete {1: None, 2: None, 3: None} None Alas, I can't offer any help with how to use __getnewargs__() or the other dunders to properly handle it. -Original Message- From: Python-list [mailto:python-list-bounces+david.raymond=tomtom@p

Re: in a pickle

2019-03-06 Thread duncan smith
[snip] Sorry, this is Python 3.6 on Linux. Duncan -- https://mail.python.org/mailman/listinfo/python-list

in a pickle

2019-03-06 Thread duncan smith
Hello, I've been trying to figure out why one of my classes can be pickled but not unpickled. (I realise the problem is probably with the pickling, but I get the error when I attempt to unpickle.) A relatively minimal example is pasted below. >>> import pickle >>> class test(dict):

Re: Python to C++ in a pickle

2015-04-02 Thread richismyname
On Tuesday, July 4, 2000 at 12:00:00 AM UTC-7, Larry Whitley wrote: > I'd like to pickle an object in python and unpickle it in C++. The object > in question is a python dictionary so it will have to go into a C++ map. > Has someone done this and is willing to share? Or, is the cPickle source > a