diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-29 16:08:36 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-29 16:08:36 +0000 |
commit | c0f391af951ab75a1c486d4179216d31997a0f83 (patch) | |
tree | dc90d3214bd1c8c42e5f1acd7d8303739eafccde /lib/sqlalchemy/util.py | |
parent | bb991b972d3c76f9f2528916a77ff893cd433f99 (diff) | |
download | sqlalchemy-c0f391af951ab75a1c486d4179216d31997a0f83.tar.gz |
- fixed textual select elements that got broke the other day
- docstring work
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r-- | lib/sqlalchemy/util.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 08b281684..d4627974b 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -127,6 +127,24 @@ class SimpleProperty(object): else: return getattr(obj, self.key) +class NotImplProperty(object): + """a property that raises ``NotImplementedError``.""" + + def __init__(self, doc): + self.__doc__ = doc + + def __set__(self, obj, value): + raise NotImplementedError() + + def __delete__(self, obj): + raise NotImplementedError() + + def __get__(self, obj, owner): + if obj is None: + return self + else: + raise NotImplementedError() + class OrderedProperties(object): """An object that maintains the order in which attributes are set upon it. |