上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 119 下一页
摘要: DuFlyweight.py # 享元模式 Flyweight Pattern geovindu,Geovin Du,涂聚文 import time class Arrow: def __init__(self, x, y, z, velocity): self.x = x self.y = y s 阅读全文
posted @ 2022-10-22 11:32 ®Geovin Du Dream Park™ 阅读(33) 评论(0) 推荐(0)
摘要: DuFacade.py import os import re import threading # 外观模式 Facade Pattern class _IgnitionSystem(object): @staticmethod def produce_spark(): return True c 阅读全文
posted @ 2022-10-22 07:07 ®Geovin Du Dream Park™ 阅读(27) 评论(0) 推荐(0)
摘要: DuDecorator.py # 装饰模式 Decorator Pattern import six # https://pypi.org/project/six/ from abc import ABCMeta @six.add_metaclass(ABCMeta) class Abstract_ 阅读全文
posted @ 2022-10-21 22:40 ®Geovin Du Dream Park™ 阅读(15) 评论(0) 推荐(0)
摘要: DuComposite.py # 组合模式 Composite Pattern from __future__ import annotations from abc import ABC, abstractmethod from typing import List class Component 阅读全文
posted @ 2022-10-21 22:21 ®Geovin Du Dream Park™ 阅读(26) 评论(0) 推荐(0)
摘要: DuSingleton.py import httplib2 # https://pypi.org/project/httplib2/ import os import re import threading import urllib import urllib.request from urll 阅读全文
posted @ 2022-10-20 22:42 ®Geovin Du Dream Park™ 阅读(34) 评论(0) 推荐(0)
摘要: DuPrototype.py import copy ## 原型模式 Prototype Pattern DuPrototype。py class SelfReferencingEntity: def __init__(self): self.parent = None def set_parent 阅读全文
posted @ 2022-10-20 21:50 ®Geovin Du Dream Park™ 阅读(44) 评论(0) 推荐(0)
摘要: DuBridge.py # 桥接模式 Bridge Pattern # DuBridyge.py editor: geovindu, Geovin Du from __future__ import annotations from abc import ABC, abstractmethod cl 阅读全文
posted @ 2022-10-19 22:30 ®Geovin Du Dream Park™ 阅读(50) 评论(0) 推荐(0)
摘要: DuBuilder.py # 生成器模式 Builder Pattern from __future__ import annotations from abc import ABC, abstractmethod from typing import Any class Builder(ABC): 阅读全文
posted @ 2022-10-19 17:57 ®Geovin Du Dream Park™ 阅读(26) 评论(0) 推荐(0)
摘要: AbstractFactory.py ## 抽象工厂模式 Abstract Factory Pattern from __future__ import annotations from abc import ABC, abstractmethod class AbstractFactory(ABC 阅读全文
posted @ 2022-10-18 21:19 ®Geovin Du Dream Park™ 阅读(32) 评论(0) 推荐(0)
摘要: Adapte.py ## 适配器模式 Adapte Pattern geovindu, Geovin Du eidt class Target: """ The Target defines the domain-specific interface used by the client code. 阅读全文
posted @ 2022-10-18 21:10 ®Geovin Du Dream Park™ 阅读(31) 评论(0) 推荐(0)
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 119 下一页