Last active
December 22, 2015 01:59
-
-
Save cocuh/6400260 to your computer and use it in GitHub Desktop.
ゆきちせんせいじぇねれーたほしい
This file contains hidden or 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
| class Yukichi: | |
| num = 0 | |
| def __init__(self): | |
| self.hakkou_bangou=self._gen_id() | |
| @classmethod | |
| def _gen_id(cls): | |
| cls.num += 1 | |
| return cls.num | |
| def __str__(self): | |
| return "yukichi_sensei" | |
| def __int__(eslf): | |
| return 10000 | |
| def gen_yukichi(): | |
| while True: | |
| yield Yukichi() | |
| gen = gen_yukichi() | |
| gen.next() | |
| gen.next() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment