#!/usr/bin/env python3

# self is the default reference for an instance
class Simple:
 data = 1.0
 def setData(self, newData):                     # a member function
    self.data = 0.0 if newData<0.0 else newData
#   self.data = newData
 def aboutClass(preString):                      # a static function
    return preString + " A simple class!"

# () default constructor (without arguments)
c1 = Simple()                                    # creating an instance
c2 = Simple()
c2.setData(3.0)                                  # calling a member function
print("c1/c2 data      :  ", c1.data, c2.data)
print("c1 type         :  ", type(c1))
print("c1.data type    :  ", type(c1.data))
print("id(c1)          :  ", id(c1))
print("id(c2)          :  ", id(c2))
print()
print(Simple.aboutClass("# main :: "))           # calling a static function
