Package ganeti :: Module serializer :: Class Private
[hide private]
[frames] | no frames]

Class Private

source code


Wrap a value so it is hard to leak it accidentally.

>>> x = Private("foo")
>>> print "Value: %s" % x
Value: <redacted>
>>> print "Value: {0}".format(x)
Value: <redacted>
>>> x.upper() == "FOO"
True
Instance Methods [hide private]
 
__init__(self, item, descr="redacted")
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
Get(self)
Return the wrapped value.
source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
__eq__(self, other) source code
 
__hash__(self)
hash(x)
source code
 
__format__(self, *_1, **_2)
default object formatter
source code
 
__getattr__(self, attr) source code
 
__call__(self, *args, **kwargs) source code
 
__getnewargs__(self) source code
 
__nonzero__(self) source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, item, descr="redacted")
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__format__(self, *_1, **_2)

source code 

default object formatter

Overrides: object.__format__
(inherited documentation)