Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parrot(object):
- def __init__(self):
- self._voltage = 100000
- @property
- def voltage(self):
- """Get the current voltage."""
- return self._voltage
- if __name__ == "__main__":
- x=Parrot()
- print x.voltage
- x.voltage=100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement