From 510a4d7f3b19c8ad634c568f7fa8f82c24fba498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 13 Apr 2024 19:29:43 +0200 Subject: [PATCH] Class, Logging --- README.md | 6 +++--- index.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7370ea7..910b1ad 100644 --- a/README.md +++ b/README.md @@ -956,11 +956,11 @@ Class class : def __init__(self, a): self.a = a + def __str__(self): + return str(self.a) def __repr__(self): class_name = self.__class__.__name__ return f'{class_name}({self.a!r})' - def __str__(self): - return str(self.a) @classmethod def get_class_name(cls): @@ -2255,7 +2255,7 @@ logging.basicConfig( .setLevel() # Processes all messages by default. .addHandler() # Adds Handler to the Logger. .setLevel() # What is sent to its/ancestors' handlers. -.propagate = # Cuts off ancestors' handlers if false. +.propagate = # Cuts off ancestors' handlers if False. ``` * **Parent logger can be specified by naming the child logger `'.'`.** * **If logger doesn't have a set level it inherits it from the first ancestor that does.** diff --git a/index.html b/index.html index 6bad888..f5fdc11 100644 --- a/index.html +++ b/index.html @@ -805,11 +805,11 @@ player = Player(point, direction) #

#Class

class <name>:
     def __init__(self, a):
         self.a = a
+    def __str__(self):
+        return str(self.a)
     def __repr__(self):
         class_name = self.__class__.__name__
         return f'{class_name}({self.a!r})'
-    def __str__(self):
-        return str(self.a)
 
     @classmethod
     def get_class_name(cls):
@@ -1861,7 +1861,7 @@ logging.debug/info/warning/error/critical(<str>)     # Processes all messages by default.
 <Logger>.addHandler(<Handler>)                       # Adds Handler to the Logger.
 <Logger>.setLevel(<int/str>)                         # What is sent to its/ancestors' handlers.
-<Logger>.propagate = <bool>                          # Cuts off ancestors' handlers if false.
+<Logger>.propagate = <bool>                          # Cuts off ancestors' handlers if False.
 
  • Parent logger can be specified by naming the child logger '<parent>.<name>'.