def main():
_a: _A = _A()
print(_a)
_b: _B = _B(Int(1))
print(_b)
_c: _C = _C(Int(2))
print(_c)
_d: _D = _D(Int(3))
print(_d)
class _A:
def __init__(self):
self._a: Int = Int(Float(Int(10)))
def __repr__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def __str__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
class _B:
def __init__(self , _b: Int):
self._b: Int = Int(_b)
self._c: Int = Int(Float(Int(10)))
def __repr__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def __str__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
class _C:
def __init__(self , _d: Int):
self._d: Int = Int(_d)
self._e: Int = Int(Float(Int(10)))
self._f: Int = Int(Float(Int(10)))
def __repr__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def __str__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def _g(self):
print()
class _D:
def __init__(self , _h: Int):
self._h: Int = Int(_h)
def __repr__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def __str__(self):
return f"{self.__class__.__name__}({', '.join(f'{key}={value}' for key, value in self.__dict__.items())})".replace("_", "")
def _i(self):
print()
if __name__ == '__main__':
# clear screen before executing
import platform
import os
os.system('cls' if platform.system() == 'Windows' else 'clear')
# declare globals
main()
caveat: if the value of the property is a string with underscore, it will remove that underscore too. dunno the solution rn
closes #286
output before
output after
source
transpiled
caveat: if the value of the property is a string with underscore, it will remove that underscore too. dunno the solution rn
![image](https://github.com/Gidsss/UwUIDE/assets/146176671/66853020-e703-4744-baa5-4b95a0b2fed5)