source:
java2python/core/test/testcode/Person.py@
481
Last change on this file since 481 was 458, checked in by , 17 months ago | |
---|---|
File size: 344 bytes |
Line | |
---|---|
1 | import sys |
2 | from typing import List |
3 | |
4 | |
5 | class Person: |
6 | def __init__(self, nm:str): |
7 | self.__name:str |
8 | self.__name=nm |
9 | #Override |
10 | def __repr__(self) -> str: |
11 | return "Person[" + self.__name + "]" |
12 | @staticmethod |
13 | def main(args:List[str]) -> None: |
14 | sys.stdout.write(str(Person("Kees"))+'\n') |
15 | |
16 | if __name__ == "__main__": |
17 | Person.main(sys.argv[1:]) |
Note:
See TracBrowser
for help on using the repository browser.