Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Your script is subject to the "shared default value" syndrome, explained
here:
http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects

As indicated in the FAQ, your function could be rewritten like this:

def getElementsByAttrib(self, value, AName="ID-REF", list=None):
  if list is None:
      list = []
  ...

to have a less surprising behavior.

----------
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3958>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to