create an instance to use the class simply as a namespace container : Variable Scope : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Variable Scope »

 

create an instance to use the class simply as a namespace container


class MyData(object):
    pass
mathObj = MyData()
mathObj.x = 4
mathObj.y = 5
mathObj.x + mathObj.y
mathObj.x * mathObj.y



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Function
» Variable Scope