(Parte 1) Mixins, Abstração e a união de tudo até aqui
This commit is contained in:
14
aula141/log.py
Normal file
14
aula141/log.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Abstração
|
||||||
|
class Log:
|
||||||
|
def log(self, msg):
|
||||||
|
raise NotImplementedError('Implemente o método log')
|
||||||
|
|
||||||
|
|
||||||
|
class LogFileMixin(Log):
|
||||||
|
def log(self, msg):
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
l = LogFileMixin()
|
||||||
|
l.log('qualquer coisa')
|
||||||
1
aula141/main.py
Normal file
1
aula141/main.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from log import Log
|
||||||
Reference in New Issue
Block a user