Also, I don't think you can rely on memory being allocated sequentially any
more now that everyone has implemented some level of ASLR.
https://en.wikipedia.org/wiki/Address_space_layout_randomization
On Sat, Jun 16, 2018 at 12:22 PM Alister via Python-list <
python-list@python.org> wrote:
> On S
I am also wondering about this behavior. Thank you Chris A for providing the
explanation.
On Jun 16, 2018, at 5:45 PM, Chris Angelico
mailto:ros...@gmail.com>> wrote:
On Sun, Jun 17, 2018 at 2:38 AM, mailto:ip.b...@gmail.com>>
wrote:
Hi everyone,
I'm intrigued by the output of the following
On Sat, 16 Jun 2018 09:38:07 -0700 (PDT), ip.b...@gmail.com wrote:
> Hi everyone,
>
> I'm intrigued by the output of the following code, which was totally
> contrary to my expectations. Can someone tell me what is happening?
>
myName = "Kevin"
id(myName)
> 47406848
id(myName[0])
> 36
On Sun, Jun 17, 2018 at 5:05 AM, Marko Rauhamaa wrote:
> Bart :
> > So, how /do/ you obtain the memory address of those values are
> > located? For example, in order to pass it to some foreign C function
> > that takes a void* parameter.
>
> That is dependent on the Python implementation. CPython
Bart :
> So, how /do/ you obtain the memory address of those values are
> located? For example, in order to pass it to some foreign C function
> that takes a void* parameter.
That is dependent on the Python implementation. CPython supports native
C and C++ extensions:
https://docs.python.org/3
On Sun, 17 Jun 2018 11:01:41 +0100, Bart wrote:
> So, how /do/ you obtain the memory address of those values are located?
You don't. There is no implementation-independent Python function to get
the memory address of an object.
The concept of a fixed memory address for objects is not even a sen
On Sun, Jun 17, 2018 at 8:01 PM, Bart wrote:
> On 17/06/2018 03:28, Grant Edwards wrote:
>>
>> On 2018-06-16, ip.b...@gmail.com wrote:
>>
>>> I'm intrigued by the output of the following code, which was totally
>>> contrary to my expectations. Can someone tell me what is happening?
>>>
>> myN
On 17/06/2018 03:28, Grant Edwards wrote:
On 2018-06-16, ip.b...@gmail.com wrote:
I'm intrigued by the output of the following code, which was totally
contrary to my expectations. Can someone tell me what is happening?
myName = "Kevin"
id(myName)
47406848
id(myName[0])
36308576
id(myName
On 2018-06-16, ip.b...@gmail.com wrote:
> I'm intrigued by the output of the following code, which was totally
> contrary to my expectations. Can someone tell me what is happening?
>
myName = "Kevin"
id(myName)
> 47406848
id(myName[0])
> 36308576
id(myName[1])
> 2476000
What'
On Sun, Jun 17, 2018 at 2:38 AM, wrote:
> Hi everyone,
>
> I'm intrigued by the output of the following code, which was totally contrary
> to my expectations. Can someone tell me what is happening?
>
myName = "Kevin"
id(myName)
> 47406848
id(myName[0])
> 36308576
id(myName[1]
On Sat, 16 Jun 2018 09:38:07 -0700, ip.bcrs wrote:
> Hi everyone,
>
> I'm intrigued by the output of the following code, which was totally
> contrary to my expectations. Can someone tell me what is happening?
>
myName = "Kevin"
id(myName)
> 47406848
id(myName[0])
> 36308576
i
On Sat, 16 Jun 2018 13:19:04 -0400, Joel Goldstick wrote:
> On Sat, Jun 16, 2018 at 12:38 PM, wrote:
>> Hi everyone,
>>
>> I'm intrigued by the output of the following code, which was totally
>> contrary to my expectations. Can someone tell me what is happening?
>>
> myName = "Kevin"
> i
On 2018-06-16 17:38, ip.b...@gmail.com wrote:
Hi everyone,
I'm intrigued by the output of the following code, which was totally contrary
to my expectations. Can someone tell me what is happening?
myName = "Kevin"
id(myName)
47406848
id(myName[0])
36308576
id(myName[1])
2476000
I expecte
On Sat, Jun 16, 2018 at 12:38 PM, wrote:
> Hi everyone,
>
> I'm intrigued by the output of the following code, which was totally contrary
> to my expectations. Can someone tell me what is happening?
>
myName = "Kevin"
id(myName)
> 47406848
id(myName[0])
> 36308576
id(myName[1
Hi everyone,
I'm intrigued by the output of the following code, which was totally contrary
to my expectations. Can someone tell me what is happening?
>>> myName = "Kevin"
>>> id(myName)
47406848
>>> id(myName[0])
36308576
>>> id(myName[1])
2476000
I expected myName[0] to be located at the same
15 matches
Mail list logo