diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-05 19:02:08 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-05 19:02:08 -0500 |
| commit | 1104dcaa67062f27bf7519c8589f550bd5d5b4af (patch) | |
| tree | 702802bd3f0e5db235a109ba48707ea262f1782b /lib/sqlalchemy/orm/base.py | |
| parent | 41ae0270d99793608ce563b84e7befb3aa39252e (diff) | |
| download | sqlalchemy-1104dcaa67062f27bf7519c8589f550bd5d5b4af.tar.gz | |
- add MemoizedSlots, a generalized solution to using __getattr__
for memoization on a class that uses slots.
- apply many more __slots__. mem use for nova now at 46% savings
Diffstat (limited to 'lib/sqlalchemy/orm/base.py')
| -rw-r--r-- | lib/sqlalchemy/orm/base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py index afeeba322..c5c8c5e2e 100644 --- a/lib/sqlalchemy/orm/base.py +++ b/lib/sqlalchemy/orm/base.py @@ -437,7 +437,6 @@ class InspectionAttr(object): here intact for forwards-compatibility. """ - __slots__ = () is_selectable = False @@ -490,6 +489,12 @@ class InspectionAttr(object): """ + +class InspectionAttrInfo(InspectionAttr): + """Adds the ``.info`` attribute to :class:`.Inspectionattr`. + + """ + @util.memoized_property def info(self): """Info dictionary associated with the object, allowing user-defined |
