summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrad Allen <bradallen137@gmail.com>2011-03-15 18:13:53 -0400
committerBrad Allen <bradallen137@gmail.com>2011-03-15 18:13:53 -0400
commit2b070a20c2ecf5bfcb85199467e07736f8988e81 (patch)
tree92570184fa9962b5f9e9ca3e73ca34c050f57828 /lib
parentd2c2f06ee1c02da67974caf7bf821bcda3cfc25b (diff)
downloadsqlalchemy-2b070a20c2ecf5bfcb85199467e07736f8988e81.tar.gz
Docstring for TypeDecorator.__init__
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/types.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index c901e938a..2200511e5 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -390,7 +390,17 @@ class TypeDecorator(TypeEngine):
__visit_name__ = "type_decorator"
def __init__(self, *args, **kwargs):
- """#todo"""
+ """Initialize the instance accepting the same kind of parameters
+ as the type being wrapped (as specified in the 'impl' class
+ attribute).
+
+ Assuming the class level 'impl' is a callable (the common case),
+ it will be instantiated and assigned to a self.impl instance
+ attribute (thus overriding the class attribute of the same name).
+
+ If the class level 'impl' is not a callable (the unusual case),
+ it will be assigned to the same instance attribute 'as-is'.
+ """
if not hasattr(self.__class__, 'impl'):
raise AssertionError("TypeDecorator implementations "
"require a class-level variable "