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"
>
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
"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
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
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
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
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
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