How to implement this mechanism:
Posted
by Sorush Rabiee
on Stack Overflow
See other posts from Stack Overflow
or by Sorush Rabiee
Published on 2010-03-28T11:11:43Z
Indexed on
2010/03/28
11:23 UTC
Read the original article
Hit count: 332
python
Hi
i want to implement a dynamic relation mechanism with python something like:
a:=10
b:=30
c:=a+b
print c
a+=20
print c
output:
40
60
c is always result of a+b.
so if a or b change, then c automatically updates value. i write a code in C# and do this by set
and get
mechanism. now want to translate it to python code for using in another program (FontLab Studio 5). I'm not so familiar with Python. does he have a get,set
feature like C#? if not ho to implement one?
© Stack Overflow or respective owner