mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
19 lines
194 B
Python
19 lines
194 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
def new_init(self, bar):
|
|
self.bar = bar
|
|
|
|
|
|
def dec(cls):
|
|
cls.__init__ = new_init
|
|
return cls
|
|
|
|
|
|
@dec
|
|
@dataclass
|
|
class Foo:
|
|
bar: int
|
|
|
|
|
|
Foo(<arg1>) |