Advertisement
Guest User

Untitled

a guest
Oct 25th, 2010
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. class Parrot(object):
  2.     def __init__(self):
  3.         self._voltage = 100000
  4.  
  5.     @property
  6.     def voltage(self):
  7.         """Get the current voltage."""
  8.         return self._voltage
  9.  
  10. if __name__ == "__main__":
  11.     x=Parrot()
  12.     print x.voltage
  13.     x.voltage=100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement