mirror of
https://github.com/erg-lang/erg.git
synced 2025-12-23 05:36:48 +00:00
18 lines
239 B
Python
18 lines
239 B
Python
i = !0
|
|
|
|
C = Class()
|
|
C.
|
|
__init__! self =
|
|
print! "initialize:", self
|
|
i.inc!()
|
|
__del__! self =
|
|
print! "delete:", self
|
|
i.dec!()
|
|
|
|
p!() =
|
|
c = C.new()
|
|
assert i == 1
|
|
print! c
|
|
|
|
p!()
|
|
assert i == 0
|