Discord
Login
Community
DARK THEME

init not working when using class in library

If I try to define a new class member in init(), it just stops the whole function from doing anything, without reporting an error. Any instructions, before or after, don't execute. It only happens when the class is defined inside the library subfolders, otherwise everything works fine. However, the class itself is still loaded, if you print the class it works just fine, this only is a problem when making a new class member

If you suspect the problem to be that you are defining a new class member in init(), it would be nice to produce a minimal test case where all you are doing is that and which produces the error. I would help me a lot taking a look at this and finding the problem.

For now it is not clear to me what you mean with "define a new class member". Do you mean creating a new instance of the class, or do you actually mean adding a new property to the class like in myclass.newmember = (something)?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community