a question about python

李白,字一日 calidion at gmail.com
Thu Nov 26 04:21:39 EST 2009


hi,
i have a question on python programming.

let file a.py has a class named a,
  class a():
    __G__ = "1111"

in file b.py i need to insert an attribute __C__ to class a

it would be as if class a defined in file a.py like this:
  class a():
    __G__ = "1111"
    __C__ = "22222"

how this be done in python without inheritance?



More information about the Python-list mailing list