GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — FastPy/examples/far_future.fpy at master · CrazyProger1/FastPy Expand file tree/ Copy pathfar_future.fpyMore file actions 55 lines (35 loc) · 1004 Bytes / Copy pathfar_future.fpyFile metadata and controls55 lines (35 loc) · 1004 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 interface Car: public: fun __init__(name: str, weight: int): ... @property fun brand() -> str: ... @property fun name() -> str: ... @property fun weight() -> int: ... class Tesla(Car): # Car implementation private: __name: str __weight: int public: fun __init__(name: str, weight: int): __name = name __weight = weight @property fun brand() -> str: return 'Tesla' @property fun name() -> str: return __name @property fun weight() -> int: return __weight fun car_factory(car_brand: str, name: str, weight: int) -> Car: match car_brand: case "Tesla": return Tesla(name, weight) default: return null some_car: Car = car_factory("Tesla", "Model X", 2301) log(some_car.name) # Model X log(some_car.weight) # 2301 |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |