2
$\begingroup$

This is a getsizeof() return for basic types in blender's python console:

enter image description here

And this is one (same args) in Python Shell:

enter image description here

$\endgroup$
  • $\begingroup$ This seems to be more about Python programing than about Blender or its Python API. I think it should be considered off-topic on Blender Stack Exchange. I think memory allocation may be different in different Python interpreters or versions, but you should ask this on platforms oriented more to programming to get a more competent answer. Stack Overflow may be a better place for this question. $\endgroup$ – Martin Z Jan 4 at 11:44
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because it is not about the usage of Blender or its Python API. $\endgroup$ – Martin Z Jan 4 at 11:45
  • 1
    $\begingroup$ 1 an instance of an int object in python? Is there an expectation the value of sys.getsizeof(1) be constant? (I do get 28 in python shell and blender's py console on ubuntu 64 bit. See this answer $\endgroup$ – batFINGER Jan 4 at 11:48
  • $\begingroup$ It seems this might not be something that Blender is doing differently but something that most different Python implementations and versions do. I think it might be better answered elsewhere as well. Are there any situations where this kind of information might be useful to Blender users that I am missing? $\endgroup$ – Martin Z Jan 4 at 12:13
  • $\begingroup$ Martin Z I hesitate to delete the question. Maybe, let the community decides. $\endgroup$ – Oleksiy Plotnyts'kyy Jan 4 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.