Commit 2a22df13 authored by Tres Seaver's avatar Tres Seaver Committed by GitHub

Merge pull request #64 from smheidrich/docs_for_length

Add documentation for Length class
parents 0a9d6245 eaf2682e
......@@ -43,13 +43,16 @@ class Length(persistent.Persistent):
self.value = v
def set(self, v):
"Set the length value to v."
self.value = v
def _p_resolveConflict(self, old, s1, s2):
return s1 + s2 - old
def change(self, delta):
"Add delta to the length value."
self.value += delta
def __call__(self, *args):
"Return the current length value."
return self.value
......@@ -96,3 +96,13 @@ Protocol APIs
.. autointerface:: IIntegerFloatBTreeModule
:members:
:member-order: bysource
Utilities
-------------
.. automodule:: BTrees.Length
.. autoclass:: Length
:members:
.. automethod:: __call__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment