Commit e3e419fe authored by Vincent Pelletier's avatar Vincent Pelletier

Comment weirdness, simplify code, and add a comment about suspicious code.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15784 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e3f641e
......@@ -441,14 +441,15 @@ class ComplexQuery(QueryMixin):
Used in order to concatenate many queries
"""
def __init__(self, *args, **kw):
# XXX: python weirdness
# >>> def foo(a='a', *args):
# ... pass
# ...
# >>> foo('something', a='test')
# TypeError: foo() got multiple values for keyword argument 'a'
self.query_list = args
operator = None
if kw.has_key('operator'):
operator = kw['operator']
del kw['operator']
if operator is None:
operator = 'AND'
self.operator = operator
self.operator = kw.pop('operator', 'AND')
# XXX: What is that used for ?! It's utterly dangerous.
self.__dict__.update(kw)
def __call__(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment