Benutzer:MovGP0/Python/Classes

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
   MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      

# class derives from class object
# with Python 3+, every class derives from opject by default
class Document(object): 
    def serialize(self): 
        # ...

    # this.ToString()
    def __str__(self):
        return "I am a document"