~yacinechaouche/+junk/BZR

« back to all changes in this revision

Viewing changes to CODE/TEST/PYTHON/edit_attribtue.py

  • Committer: yacinechaouche at yahoo
  • Date: 2015-01-14 22:23:03 UTC
  • Revision ID: yacinechaouche@yahoo.com-20150114222303-6gbtqqxii717vyka
Ajout de CODE et PROD. Il faudra ensuite ajouter ce qu'il y avait dan TMP

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
class A:
 
2
    def __init__(self):
 
3
        self.a = 10
 
4
        
 
5
def edit(obj,attr,value):
 
6
    setattr(obj,attr,value)
 
7
 
 
8
a = A()
 
9
edit(a,"a",40)
 
10
print a.a