Neville Dempsey a écrit :
What do I need to add to HTMLDecorator?
A simpler example:
import cgi
class ClassX(object):
pass # ... with own __repr__
class ClassY(object):
pass # ... with own __repr__
inst_x=ClassX()
Why do you need to prefix your variables with 'inst_' ?
inst_y=ClassY(
Neville Dempsey a écrit :
Basically I have an existing (maybe a rather large and complicated
(existing) instance) that
I want to add new member to.
I suppose you mean "attributes" ?
Cheers
N
Hacks/attempts follow:
from math import sqrt
try2
duck_obj = [ i*i for i
What do I need to add to HTMLDecorator?
A simpler example:
import cgi
class ClassX(object):
pass # ... with own __repr__
class ClassY(object):
pass # ... with own __repr__
inst_x=ClassX()
inst_y=ClassY()
inst_z=[ i*i for i in range(25) ]
inst_b=True
class HTMLDecorator(object):
def
Basically I have an existing (maybe a rather large and complicated
(existing) instance) that
I want to add new member to.
Cheers
N
Hacks/attempts follow:
from math import sqrt
try2
duck_obj = [ i*i for i in range(25) ] # OR a large sparse matrix
# I "want" to an a use