issue_isinstance.py 446 B

1234567891011121314151617181920
  1. class scr_Text:
  2. def cus_print(self, data, end='\n'):
  3. str_buf = ""
  4. if isinstance(data, str):
  5. str_buf = str_buf + data
  6. elif isinstance(data, int):
  7. str_buf = str_buf + str(data)
  8. else:
  9. str_buf = "The type is not recognized"
  10. str_buf = str_buf + end
  11. screen = scr_Text()
  12. screen.cus_print(12)
  13. screen.cus_print(12)
  14. screen.cus_print(12)
  15. screen.cus_print(12)
  16. print('PASS')