Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getters and setters

class P:
    def __init__(self, x):
        self.__x = x
    def get_x(self):
        return self.__x
    def set_x(self, x):
        self.__x = x
Source by python-course.eu #
 
PREVIOUS NEXT
Tagged: #getters #setters
ADD COMMENT
Topic
Name
7+5 =