Skip to content

Instantly share code, notes, and snippets.

@LouiS0616
Created May 25, 2020 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LouiS0616/9e53b7790adb701034c3c43f126d95d9 to your computer and use it in GitHub Desktop.
Save LouiS0616/9e53b7790adb701034c3c43f126d95d9 to your computer and use it in GitHub Desktop.
JISフローチャートの規格に無理やり適合させたPython。while は while not( ) と書けばよろしい。
class Array_(list):
def __init__(self, size, lst=None):
if lst is None:
lst = [None] * size
assert len(lst) == size
list.__init__(self, lst)
def __getitem__(self, idx):
return list.__getitem__(self, idx-1)
def __setitem__(self, idx, v):
list.__setitem__(self, idx-1, v)
def print_(arg):
print(arg, end='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment