Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 291 Bytes

python-tips.md

File metadata and controls

18 lines (16 loc) · 291 Bytes

Tips in Python

Alias

type Vector2 = Tuple[float, float]

Typing

class Stress:
    xx: float = 0
    xy: float = 0
    yy: float = 0
    def __init__(self, xx: float, xy: float, yy: float) -> None:
        self.xx = xx
        self.xy = xy
        self.yy = yy