Re: problem using pickle

2016-10-27 Thread Veek M
Ben Finney wrote: > "Veek. M" writes: > >> class Foo(object): >> pass >> >> object is a keyword and you're using it as an identifier > > Python does not have ‘object’ as a keyword. ‘and’ is a keyword. > > Here's the difference:: > > >>> object > > >>> object = "Lorem ipsum" >

Re: problem using pickle

2016-10-27 Thread Veek M
Rustom Mody wrote: > On Saturday, July 2, 2016 at 9:17:01 AM UTC+5:30, Veek. M wrote: >> object is a keyword and you're using it as an identifier > > keyword and builtin are different > In this case though the advice remains the same > In general maybe not... > Just sayin' np - feel free to corre

Re: problem using pickle

2016-07-01 Thread Ben Finney
"Veek. M" writes: > class Foo(object): > pass > > object is a keyword and you're using it as an identifier Python does not have ‘object’ as a keyword. ‘and’ is a keyword. Here's the difference:: >>> object >>> object = "Lorem ipsum" >>> object 'Lorem ipsum' >>> and

Re: problem using pickle

2016-07-01 Thread Rustom Mody
On Saturday, July 2, 2016 at 9:17:01 AM UTC+5:30, Veek. M wrote: > object is a keyword and you're using it as an identifier keyword and builtin are different In this case though the advice remains the same In general maybe not... Just sayin' -- https://mail.python.org/mailman/listinfo/python-list

Re: problem using pickle

2016-07-01 Thread Veek. M
Nicky Mac wrote: > Dear Python team, > I have studied the excellent documentation, and attempted to make use > of pickle thus: > > filename = 'my_saved_adventure' > import pickle > class object: > def __init__(self,i,.t) : > self.id = i > . > > class world

Re: problem using pickle

2016-03-13 Thread Terry Reedy
On 3/12/2016 10:45 AM, Nicky Mac wrote: class object: def __init__(self,i, This is a syntax error, so this is not the code that ran without error. As Peter Otten said, please write a minimal complete runnable example that shows the error and then copy and paste it as run. -- Terry J

Re: problem using pickle

2016-03-13 Thread Peter Otten
Nicky Mac wrote: > Dear Python team, > I have studied the excellent documentation, That is always a laudable endeavour ;) > and attempted to make use of > pickle thus: > > filename = 'my_saved_adventure' > import pickle > class object: 'object' already is the name for a Python built-in; you

problem using pickle

2016-03-13 Thread Nicky Mac
Dear Python team, I have studied the excellent documentation, and attempted to make use of pickle thus: filename = 'my_saved_adventure' import pickle class object: def __init__(self,i,.t) : self.id = i . class world: def __init__(self): self.obj