File: dynamic_members.py

package info (click to toggle)
pytkdocs 0.16.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 784 kB
  • sloc: python: 4,621; makefile: 28; javascript: 13
file content (23 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# See issue 65: https://github.com/pawamoy/mkdocstrings/issues/65


def method1():
    pass


def method2():
    pass


METHODS = {
    "method1": method1,
    "method2": method2,
}


class Class:
    pass


for name, method in METHODS.items():
    setattr(Class, name, method)