8th day of python challenges 111-117

This commit is contained in:
abd.shallal
2019-08-04 15:26:35 +03:00
parent b04c1b055f
commit 627802c383
3215 changed files with 760227 additions and 491 deletions

View File

@@ -0,0 +1,2 @@
#!/usr/bin/python
"""ttttttttttttttttttttoooooooooooooooooooooooooooooooooooooooooooooooooooooo lllllllllllooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngggggggggggggggggg"""

View File

@@ -0,0 +1,12 @@
digraph "classes_No_Name" {
charset="utf-8"
rankdir=BT
"0" [label="{Ancestor|attr : str\lcls_member\l|get_value()\lset_value()\l}", shape="record"];
"1" [label="{DoNothing|\l|}", shape="record"];
"2" [label="{Interface|\l|get_value()\lset_value()\l}", shape="record"];
"3" [label="{Specialization|TYPE : str\lrelation\ltop : str\l|}", shape="record"];
"3" -> "0" [arrowhead="empty", arrowtail="none"];
"0" -> "2" [arrowhead="empty", arrowtail="node", style="dashed"];
"1" -> "0" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="cls_member", style="solid"];
"1" -> "3" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="relation", style="solid"];
}

View File

@@ -0,0 +1,29 @@
""" docstring for file clientmodule.py """
from data.suppliermodule_test import Interface, DoNothing
class Ancestor:
""" Ancestor method """
__implements__ = (Interface,)
cls_member = DoNothing()
def __init__(self, value):
local_variable = 0
self.attr = 'this method shouldn\'t have a docstring'
self.__value = value
def get_value(self):
""" nice docstring ;-) """
return self.__value
def set_value(self, value):
self.__value = value
return 'this method shouldn\'t have a docstring'
class Specialization(Ancestor):
TYPE = 'final class'
top = 'class'
def __init__(self, value, _id):
Ancestor.__init__(self, value)
self._id = _id
self.relation = DoNothing()

View File

@@ -0,0 +1,8 @@
digraph "packages_No_Name" {
charset="utf-8"
rankdir=BT
"0" [label="data", shape="box"];
"1" [label="data.clientmodule_test", shape="box"];
"2" [label="data.suppliermodule_test", shape="box"];
"1" -> "2" [arrowhead="open", arrowtail="none"];
}

View File

@@ -0,0 +1,10 @@
""" file suppliermodule.py """
class Interface:
def get_value(self):
raise NotImplementedError
def set_value(self, value):
raise NotImplementedError
class DoNothing: pass