Very nice video 👍 The example where "a=literal; b=literal" results in "a is b" only works for "small" literals. I tried it out in Python 3.11.4 and it worked in the range [-5, 256]. "a=257;b=257;a is b" will return false. It is also a CPython implementation detail.
Hi, how to pass the pointer of a python class(self pointer) to a c function and retrieve it from another c function ? I mean SetWindowLongPtr and GetWindowLongPtr.
Next thing you´re going to tell me is that I can do manual memory management with Python using some weird module. I can´t...RIGHT? Oh god, now that I think about it, something like "import Malloc" might just be something that actually exist.
I guess it depends on the case. If you are building a special data type or class there might be a use case. I think it's probably a better idea to use them in C i think if you want to debug wrappers, maybe it's useful as well.
B[0] = 100 Print(a) Just hurt my soul for some reason. Why did that update ‘a’ and not an independent copy of ‘a’ that had been initialized during the statement ‘b=a’?
The main use of the ctypes module is to provide compatibility with libraries and programs written in C, it may or may not be faster but it's general purpose isn't to improve performance
i think for this year neural nine is the best youtuber with "grafikart" and 'codetalker9408' so thx a lot for all the video you share... do you have an example that you can use this or is just thing we know but not using?
When you showing the example with id(a) == id(b) at the beginning you could briefly explain the "Python Integer Caching" concept.
Very nice video 👍
The example where "a=literal; b=literal" results in "a is b" only works for "small" literals. I tried it out in Python 3.11.4 and it worked in the range [-5, 256].
"a=257;b=257;a is b" will return false. It is also a CPython implementation detail.
I really appreciate these advanced tips! Thanks
Hi, how to pass the pointer of a python class(self pointer) to a c function and retrieve it from another c function ? I mean SetWindowLongPtr and GetWindowLongPtr.
3:22 tf..... why is it acting like that with lists...... i wish they remove this list behaviour in future versions
I just love the beat of your intro too😇😂
The neuralintents library isn't working i try the exact same code as your
Next thing you´re going to tell me is that I can do manual memory management with Python using some weird module.
I can´t...RIGHT? Oh god, now that I think about it, something like "import Malloc" might just be something that actually exist.
A great video Sir, thanks a lot!
The question is why should i use pointers in python?
Thats good question
If you want indirection
They are not pointers in python, they’re just pointer in c.
that was my question but its intersting to know anyway
I guess it depends on the case. If you are building a special data type or class there might be a use case. I think it's probably a better idea to use them in C i think if you want to debug wrappers, maybe it's useful as well.
B[0] = 100
Print(a)
Just hurt my soul for some reason. Why did that update ‘a’ and not an independent copy of ‘a’ that had been initialized during the statement ‘b=a’?
Would this increase performace or it wont make any difference
The main use of the ctypes module is to provide compatibility with libraries and programs written in C, it may or may not be faster but it's general purpose isn't to improve performance
i think for this year neural nine is the best youtuber with "grafikart" and 'codetalker9408' so thx a lot for all the video you share...
do you have an example that you can use this or is just thing we know but not using?
Thanks - very useful. :)
What about the python pointer library?
Well explained 😇👏
Which IDE does he is using?
Pycharm
pycharm
So u meant that python always deterrence that pointer behind the scenes ?
pls DSA playlist bro : (
NICE
I missed where this ability was useful? I get you have the ability to monkey around with pointers and their contents but… why?
I fail to see a use case for this
me too, makes c looks easier :\
Well yeah everything is literally one
Cool
👀!!