Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SecureString(str):
- def __new__(cls, content):
- s = super(SecureString, cls).__new__(cls, '***')
- s._content = content
- return s
- def __str__(self):
- return str.__str__(self)
- @property
- def content(self):
- return self._content
Advertisement
Add Comment
Please, Sign In to add comment