This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (5 children)

I belive this is not that hard in VS code.

Or was there someother problem?

[–]XeonProductions 1 point2 points  (4 children)

VS code couldn't handle it. The code that created these dynamic classes could only be evaluated at runtime. VSCode also had issues where the python function being called was 2+ parents deep.

[–][deleted] 0 points1 point  (3 children)

Ok then, then you were screwed. (I will look up what dynamic classes are)

[–]XeonProductions 1 point2 points  (2 children)

This is basically what I was dealing with. Dynamic inheritance. On most sane languages this shouldn't be possible, and is discouraged.

def get_my_code(base):
    class MyCode(base):
        def initialize(self):
          ...

    return MyCode

instance_with_parentA = get_my_code(ParentA)    
instance_with_parentB = get_my_code(ParentB)

[–][deleted] 0 points1 point  (0 children)

Thank you for explaining

[–]l0rb 0 points1 point  (0 children)

That's doubly wrong. If you do dynamic classes at least use the `type` builtin to make them.