Difference between revisions of "Python:Super"

From GISAXS
Jump to: navigation, search
(Created page with "In object-oriented programming, one must sometimes call upon the parent class or super class. In python, a given object (self) can refer to its parent as: <source lang="pyth...")
(No difference)

Revision as of 15:58, 15 October 2014

In object-oriented programming, one must sometimes call upon the parent class or super class.

In python, a given object (self) can refer to its parent as:

#!/usr/bin/python
# -*- coding: utf-8 -*-

class Cube(Platonic):

    def __init__(self, args={}):
        super(Cube, self).__init__( args=args )