Created
February 11, 2020 09:46
-
-
Save pschanely/531faa9fc0866eaae9ee5dfce4e86e1c to your computer and use it in GitHub Desktop.
Shared via CrossHair Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Final | |
class Cat: | |
legs: Final[int] = 4 | |
def walk(cat: Cat, strides: int) -> int: | |
''' | |
pre: strides > 0 | |
post: __return__ >= 4 | |
''' | |
return strides * self.legs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment