diff options
Diffstat (limited to 'rdiff-backup/src/static.py')
-rw-r--r-- | rdiff-backup/src/static.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/rdiff-backup/src/static.py b/rdiff-backup/src/static.py index 0355f44..54a58ba 100644 --- a/rdiff-backup/src/static.py +++ b/rdiff-backup/src/static.py @@ -1,13 +1,21 @@ -####################################################################### +# Copyright 2002 Ben Escoto # -# static - MakeStatic and MakeClass -# -# These functions are used to make all the instance methods in a class -# into static or class methods. +# This file is part of rdiff-backup. # +# rdiff-backup is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA +# 02139, USA; either version 2 of the License, or (at your option) any +# later version; incorporated herein by reference. + +"""MakeStatic and MakeClass + +These functions are used to make all the instance methods in a class +into static or class methods. -class StaticMethodsError(Exception): - pass +""" + +class StaticMethodsError(Exception): pass def MakeStatic(cls): """turn instance methods into static ones @@ -20,7 +28,6 @@ def MakeStatic(cls): if name[0] != "_": cls.__dict__[name] = staticmethod(cls.__dict__[name]) - def MakeClass(cls): """Turn instance methods into classmethods. Ignore _ like above""" for name in dir(cls): |