3 ms·
In exact that same scenario, that you would cast to a subclass in another language, it's about language support for what for example the kernel does with contai
by 1718627440 1y ago
In exact that same scenario, that you would cast to a subclass in another language, it's about language support for what for example the kernel does with container_of.
Of course casting to a subclass isn't guaranteed to succeed always, but for example when you have actually declared it as the subclass elsewhere it's fine without checking for isinstance.