diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-01-26 11:52:02 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-01-26 11:52:02 +0000 |
commit | a1ac49f3f18e6086f87f7c963c9ee3d621439c48 (patch) | |
tree | 28eb9b63348a18bf6cec78db0527c3caf5e50cb6 /snakeoil/descriptors.py | |
parent | ferringb found a workaround. (diff) | |
download | packages-3-a1ac49f3f18e6086f87f7c963c9ee3d621439c48.tar.gz packages-3-a1ac49f3f18e6086f87f7c963c9ee3d621439c48.tar.bz2 packages-3-a1ac49f3f18e6086f87f7c963c9ee3d621439c48.zip |
Use system snakeoil now.
Diffstat (limited to 'snakeoil/descriptors.py')
-rw-r--r-- | snakeoil/descriptors.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/snakeoil/descriptors.py b/snakeoil/descriptors.py deleted file mode 100644 index bf31b9f..0000000 --- a/snakeoil/descriptors.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright: 2006 Marien Zwart <marienz@gentoo.org> -# License: GPL2 - - -"""Classes implementing the descriptor protocol.""" - - -class classproperty(object): - - """Like the builtin C{property} but takes a single classmethod. - - Used like this: - - class Example(object): - - @classproperty - def test(cls): - # Do stuff with cls here (it is Example or a subclass). - - Now both C{Example.test} and C{Example().test} invoke the getter. - A "normal" property only works on instances. - """ - - def __init__(self, getter): - self.getter = getter - - def __get__(self, instance, owner): - return self.getter(owner) |