25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

19 lines
333 B

  1. class Personnage:
  2. def tente_un_truc_risqué(self):
  3. 1 / 0
  4. def quitte_la_scène(self):
  5. print("je m'en vais")
  6. def entre_en_scène():
  7. return Personnage()
  8. personnage = entre_en_scène()
  9. try:
  10. personnage.tente_un_truc_risqué()
  11. except FileNotFoundError:
  12. print("raté")
  13. personnage.quitte_la_scène()