Quick actions

cmd+k|ctrl+k

Navigation

Languages

test class

Snippet info

Language

Python

Visibility

public

Author

pheker

Created

2017-09-21T06:27:18Z

Updated

2017-09-21T14:20:12Z

#!/usr/bin/python3
# coding=utf-8

__author__ = 'iHook1Girl'
print(__author__)

from dio import *


people = People('zhangsan',18,'',6000)
print(people)
print(people.name)

# private property can't access outside
# print(people.__salary)

# but in praticle,we also access private property outside in another way 
# eg: as the following,but don't do that as well as possible
print(people._People__salary)

people.age = 20
print(people.age)
people.setAge(22)
print(people.getAge())
# people.setAge(-1)


programmer = Programmer('iHook1Girl',17,8000)
print(programmer)
print(programmer.__doc__)
print(programmer.__class__)
INFO