mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Small changes to base.ReadOnly docstring
This commit is contained in:
@@ -47,8 +47,6 @@ class ReadOnly(object):
|
|||||||
... pass
|
... pass
|
||||||
...
|
...
|
||||||
>>> p = Person()
|
>>> p = Person()
|
||||||
>>> p.__islocked__() # Initially unlocked
|
|
||||||
False
|
|
||||||
>>> p.name = 'John Doe'
|
>>> p.name = 'John Doe'
|
||||||
>>> p.phone = '123-456-7890'
|
>>> p.phone = '123-456-7890'
|
||||||
>>> del p.phone
|
>>> del p.phone
|
||||||
@@ -56,8 +54,6 @@ class ReadOnly(object):
|
|||||||
But after an instance is locked, you cannot set its attributes:
|
But after an instance is locked, you cannot set its attributes:
|
||||||
|
|
||||||
>>> p.__lock__() # This will lock the instance
|
>>> p.__lock__() # This will lock the instance
|
||||||
>>> p.__islocked__()
|
|
||||||
True
|
|
||||||
>>> p.department = 'Engineering'
|
>>> p.department = 'Engineering'
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
@@ -82,7 +78,7 @@ class ReadOnly(object):
|
|||||||
False
|
False
|
||||||
|
|
||||||
But again, the point is that a programmer would never employ the above
|
But again, the point is that a programmer would never employ the above
|
||||||
techniques as a mere accident.
|
techniques accidentally.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__locked = False
|
__locked = False
|
||||||
|
|||||||
Reference in New Issue
Block a user