Python-Typhinweise ohne zyklische ImportePython

Python-Programme
Anonymous
 Python-Typhinweise ohne zyklische Importe

Post by Anonymous »

Ich versuche, meine große Klasse in zwei Teile aufzuteilen; Nun, im Grunde in die „Haupt“-Klasse und ein Mixin mit zusätzlichen Funktionen, etwa so:

Code: Select all

main.py
Datei:

Code: Select all

import mymixin.py

class Main(object, MyMixin):
def func1(self, xxx):
...

Code: Select all

mymixin.py
Datei:

Code: Select all

class MyMixin(object):
def func2(self: Main, xxx):  #

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post