On 20/04/15 00:29, Laura Creighton wrote:
So in this case, the binding value is an integer, not an address.
Utterly wrong. The binding value has to be an address.
I think it depends on how you define 'binding' value.
In Python binding is the connection between a name and an object.
So in a
In a message of Sun, 19 Apr 2015 19:19:27 -0400, Dave Angel writes:
>Good answer. The java jvm garbage collector is free to move blocks
>around to defrag the free space.
Correct.
>FWIW, I'm told the ID value used is a simple integer, that indexes a
>list containing the actual addresses.
Also
In a message of Sun, 19 Apr 2015 17:23:13 -0500, boB Stepp writes:
>The last sentence in this paragraph has me intrigued. Why would an
>object, once it has been created, be moved? What practical benefit
>does doing this give?
>
boB
If you have more than enough memory in your system, you never do
t
In a message of Sun, 19 Apr 2015 17:23:13 -0500, boB Stepp writes:
>On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote:
>> abstract, and the details are unimportant to the user. For example, the
>> jython system does not use addresses at all. And an object gets moved
>> around from time to time w
On 04/19/2015 06:28 PM, Joel Goldstick wrote:
On Sun, Apr 19, 2015 at 6:23 PM, boB Stepp wrote:
On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote:
On 04/19/2015 03:08 PM, boB Stepp wrote:
Or is the real point that we are adding an abstraction
layer so we don't even have to think about wh
On Sun, Apr 19, 2015 at 6:23 PM, boB Stepp wrote:
> On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote:
>> On 04/19/2015 03:08 PM, boB Stepp wrote:
>>>
>
>>> Or is the real point that we are adding an abstraction
>>> layer so we don't even have to think about where objects are
>>> physically store
On Sun, Apr 19, 2015 at 4:05 PM, Dave Angel wrote:
> On 04/19/2015 03:08 PM, boB Stepp wrote:
>>
>> Or is the real point that we are adding an abstraction
>> layer so we don't even have to think about where objects are
>> physically stored in RAM?
>
>
> Somebody keeps track, but the address is no
On 04/19/2015 03:08 PM, boB Stepp wrote:
On Sun, Apr 19, 2015 at 6:47 AM, Dave Angel wrote:
On 04/19/2015 12:07 AM, boB Stepp wrote:
[...]
I hope this is helpful, and, if there are any misstepps, that when
they are revealed both of our understandings will be enhanced!
Some of your knowle
On Sun, Apr 19, 2015 at 6:47 AM, Dave Angel wrote:
> On 04/19/2015 12:07 AM, boB Stepp wrote:
[...]
>> I hope this is helpful, and, if there are any misstepps, that when
>> they are revealed both of our understandings will be enhanced!
>>
>
> Some of your knowledge of other languages is leaking
On Sun, Apr 19, 2015 at 12:24 AM, Cameron Simpson wrote:
> On 19Apr2015 15:09, Cameron Simpson wrote:
>>
>> On 18Apr2015 23:26, boB Stepp wrote:
>>>
>>> On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote:
[...]
>>> "Two problems often exist with deep copy operations that don’t exist
>>>
On 04/19/2015 12:07 AM, boB Stepp wrote:
.
Before Peter changed one of these
changeable objects, he had:
a = [1, ["x", "y"], 3]
b = a[:]
Now BOTH a[1] and b[1] now identify the location of the inner list
object, ["x", "y"] . Apparently, Python, in its ever efficient memory
management fash
On 19Apr2015 15:09, Cameron Simpson wrote:
On 18Apr2015 23:26, boB Stepp wrote:
On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote:
Sometimes you want a "deep" copy, where "b" would have got a copy of the
iriginal x-y list. See the "copy" module's "deepcopy" function, which
supplies thi
On 18Apr2015 23:26, boB Stepp wrote:
On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote:
Sometimes you want a "deep" copy, where "b" would have got a copy of the
iriginal x-y list. See the "copy" module's "deepcopy" function, which
supplies this for when it is needed:
https://docs.pytho
On Sat, Apr 18, 2015 at 11:08 PM, Cameron Simpson wrote:
> Sometimes you want a "deep" copy, where "b" would have got a copy of the
> iriginal x-y list. See the "copy" module's "deepcopy" function, which
> supplies this for when it is needed:
>
> https://docs.python.org/3/library/copy.html#copy.
On 18Apr2015 22:03, Bill Allen wrote:
On Apr 18, 2015 4:11 PM, "boB Stepp" wrote:
On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote:
> On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
>> You can test your newfound knowledge by predicting the output of the
>> following script:
On Sat, Apr 18, 2015 at 10:03 PM, Bill Allen wrote:
>
> On Apr 18, 2015 4:11 PM, "boB Stepp" wrote:
>>
>> On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote:
>> > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
>> >
>> >> Bill Allen wrote:
[...]
>> >> You can test your newfound
On Apr 18, 2015 4:11 PM, "boB Stepp" wrote:
>
> On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote:
> > On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
> >
> >> Bill Allen wrote:
> >>
> >> > Everyone that responded,
> >> >
> >> > Thanks very much for the excellent explanations! T
On Sat, Apr 18, 2015 at 3:28 PM, Bill Allen wrote:
> On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
>
>> Bill Allen wrote:
>>
>> > Everyone that responded,
>> >
>> > Thanks very much for the excellent explanations! The distinction between
>> > a reference to an object and a sepe
print(b) will print the original copy of a which b now references which is
[1, ["x", "y"], 3]
On Apr 18, 2015 7:50 AM, "Peter Otten" <__pete...@web.de> wrote:
> Bill Allen wrote:
>
> > Everyone that responded,
> >
> > Thanks very much for the excellent explanations! The distinction between
> > a
Bill Allen wrote:
> Everyone that responded,
>
> Thanks very much for the excellent explanations! The distinction between
> a reference to an object and a seperate copy of the object is quite clear
> now.
You can test your newfound knowledge by predicting the output of the
following script:
Everyone that responded,
Thanks very much for the excellent explanations! The distinction between a
reference to an object and a seperate copy of the object is quite clear now.
--Bill
On Apr 18, 2015 1:44 AM, "Alan Gauld" wrote:
> On 18/04/15 04:16, Bill Allen wrote:
>
>> If I have a list defi
On 18/04/15 04:16, Bill Allen wrote:
If I have a list defined as my_list = ['a','b','c'], what is the is
differnce between refering to it as my_list or my_list[:]? These seem
equivalent to me. Is that the case? Is there any nuance I am missing
here? Situations where one form should be used
On 04/17/2015 11:51 PM, Ben Finney wrote:
Ben Finney writes:
Bill Allen writes:
If I have a list defined as my_list = ['a','b','c'], what is the is
differnce between refering to it as my_list or my_list[:]?
‘my_list’ is a reference to the object you've already described (the
existing obje
Ben Finney writes:
> Bill Allen writes:
>
> > If I have a list defined as my_list = ['a','b','c'], what is the is
> > differnce between refering to it as my_list or my_list[:]?
>
> ‘my_list’ is a reference to the object you've already described (the
> existing object ‘['a', 'b', 'c']’).
>
> ‘my_
Good evening Bill,
If I have a list defined as my_list = ['a','b','c'], what is the
is differnce between refering to it as my_list or my_list[:]?
These seem equivalent to me. Is that the case? Is there any
nuance I am missing here? Situations where one form should be
used as opposed to th
Bill Allen writes:
> If I have a list defined as my_list = ['a','b','c'], what is the is
> differnce between refering to it as my_list or my_list[:]?
‘my_list’ is a reference to the object you've already described (the
existing object ‘['a', 'b', 'c']’).
‘my_list[:]’ is an operation that takes
If I have a list defined as my_list = ['a','b','c'], what is the is
differnce between refering to it as my_list or my_list[:]? These seem
equivalent to me. Is that the case? Is there any nuance I am missing
here? Situations where one form should be used as opposed to the other?
Thanks,
Bill
27 matches
Mail list logo