Created
October 5, 2013 05:45
-
-
Save mrgenixus/6837169 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python | |
| class ExpirationInterface(): | |
| def setExpiration(self,value): | |
| setattr(self,self.expiration_property,value) | |
| def getExpiration(self): | |
| getattr(self,self.expiration_property) | |
| class Principal( BaseClass, ExpirationInterface ): | |
| expiration_property = "prop1" | |
| prop1 = 5 | |
| def __main__(): | |
| p = Principal() | |
| print p.prop1 | |
| p.setExpiration(4); | |
| print p.prop1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment