Skip to content

Commit 5ebec50

Browse files
authored
kafka.util classproperty (#2729)
1 parent 92790db commit 5ebec50

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

kafka/util.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,9 @@ def wrapper(self, *args, **kwargs):
120120
functools.update_wrapper(wrapper, func)
121121
return wrapper
122122

123+
124+
class classproperty:
125+
def __init__(self, f):
126+
self.f = f
127+
def __get__(self, obj, owner):
128+
return self.f(owner)

0 commit comments

Comments
 (0)