Python:Super

From GISAXS
Revision as of 15:58, 15 October 2014 by KevinYager (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 )