Commit 6ed5f128 authored by bescoto's avatar bescoto

Should now work with subclassed static classes


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@333 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 36021fba
......@@ -33,12 +33,12 @@ def MakeStatic(cls):
subclasses this will be turned into static methods.
"""
for name in dir(cls):
for name in cls.__dict__:
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):
for name in cls.__dict__:
if name[0] != "_":
cls.__dict__[name] = classmethod(cls.__dict__[name])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment