hi ,i had a problem on constructor overwrite:
i have something like:

class obj:
def __init__(self, x=100, y=None):
    if y is None:
          self.x=x
    else:
          self.y=y
so i can call :
objet = obj()  # x=100 y=None
or
objet = obj(40) # x= 40 y=None

but if i do :
objet = obj('not cool') #x='not cool' y=None
since x is not typed .

i am waiting for a result:
objet = obj('not cool') #x=100 y='not cool'
as they do in C++ or java.
is there a way to do it?
thanks
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to