Re: Memory addressing



Well what I was looking for is more along the lines of if it was
possible to assign an object at a fixed memory address like C. But
most importantly I was expecting it to be a bad habbit in python and
was simply wondering what was the accepted manner of doing so.

I did know everything was passed by reference in Python but I was
simply curious about the ability to just use

*f1 = memory_address

In order to create an object. The only use I saw for this was in the
case of a string returning the memory location albeit from the replies
I got that this would not really be desirable and necessary. I was
really just trying to avoid developping bad habbits or depending on
something that shouldnt be used commonly in the language.

I think my question has been answered well so I would like to thank
everyone for their input. Albeit a memory copy function would be fun
to use but ultimately not very fit for such a high level language I
suppose.

Again, thank you everyone this forum is very helpful,

Regards,


On Apr 27, 7:51 pm, Gabriel Genellina <gagsl-...@xxxxxxxxxxxx> wrote:
On 27 abr, 20:07, castiro...@xxxxxxxxx wrote:

That's what we need: a CopyMemory() routine.

See the copy and pickle modules.

--
Gabriel Genellina


.



Relevant Pages

  • Re: 2.6, 3.0, and truly independent intepreters
    ... just the GIL being in place, but of course it's there for a reason. ... Python faster on single core machines and more stable on multi core ... Other language designers think the same way. ... with languages that use memory pointers, have the potential to get out ...
    (comp.lang.python)
  • Re: why cannot assign to function call
    ... a porch the same if all its ... actual Python objects tend to be mutable only if they are ... In CPython, the id is given by the memory location of the object, which ... significant changes and replacements and add-ons that nevertheless don't ...
    (comp.lang.python)
  • Re: Writing huge Sets() to disk
    ... that this code takes a lot of extra memory. ... > I believe it's the references problem, ... It's a bit unfortunate that all those instance variables are global to ... it merely aggregates it for use in storing new Python objects. ...
    (comp.lang.python)
  • Re: Memory Leaks and Heapy
    ... I'm trying to plug some memory leaks in a TurboGears program. ... and simplejson for message passing between the server ... I'm using Heapy. ... means there are not many leaked objects in the python space. ...
    (comp.lang.python)
  • Re: Newbie completely confused
    ... Your program uses quite a bit of memory. ... And really, reading 30MB files should not be such a problem, right? ... 'del LINES' deletes the lines that are read from the file, but not all of your data structures that you created out of them. ... The python code loads a module written in C++ and some of the member variables actually point to C++ objects created dynamically, so one actually has to call their destructors before unbinding the python var. ...
    (comp.lang.python)