Hussein B wrote:

Please correct me if I'm wrong but Python doesn't support method
overload, right?
--
def method(self):
 #code
def method(self, data):
 #code
--
The last declaration of method() erase the previous one (like
JavaScript).

in Python, methods are callable attributes, and an attribute can only have one value. you can use default arguments to work around this:

  def method(self, data=None):
    if data is None:
       #code
    else:
       #code

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to