descriptor

clique.descriptor.Unsettable[source]

Prevent standard setting of property.

Example:

>>> class Foo(object):
...
...     x = Unsettable('x')
...
...     def __init__(self):
...         self.__dict__['x'] = True
...
>>> foo = Foo()
>>> print foo.x
True
>>> foo.x = False
AttributeError: Cannot set attribute defined as unsettable.

Project Versions

Previous topic

sorted_set

Next topic

Glossary

This Page