Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
talit:tutorial_oop3 [2025-04-26 20:28] – [Klassen und Objekte] hoftalit:tutorial_oop3 [2025-04-26 20:29] (aktuell) – [Klassen und Objekte] hof
Zeile 82: Zeile 82:
         self.word2 = word2   # but not necessarily the same contents.         self.word2 = word2   # but not necessarily the same contents.
          
-    def reverse(self):       # All objects of class WordPair share the same methods +    def reversed(self):       # All objects of class WordPair share the same methods 
-        """Creates the reverse translation."""+        """Returns a copy of the pair in the reverse direction."""
         return WordPair(self.word2, self.word1)         return WordPair(self.word2, self.word1)
  
  • talit/tutorial_oop3.1745699323.txt.gz
  • Zuletzt geändert: 2025-04-26 20:28
  • von hof