Django

Code

Changeset 7144

Show
Ignore:
Timestamp:
02/21/08 23:46:46 (10 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Removed some tuple unpacking in a function signature.

This isn't going to be permitted in Python 3, so might as well not use it here.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/django/db/models/sql/query.py

    r7126 r7144  
    608608        return False 
    609609 
    610     def join(self, (lhs, table, lhs_col, col), always_create=False, 
    611             exclusions=(), promote=False, outer_if_first=False, nullable=False): 
    612         """ 
    613         Returns an alias for a join between 'table' and 'lhs' on the given 
    614         columns, either reusing an existing alias for that join or creating a 
    615         new one. 
    616  
    617         'lhs' is either an existing table alias or a table name. If 
    618         'always_create' is True, a new alias is always created, regardless of 
    619         whether one already exists or not. 
     610    def join(self, connection, always_create=False, exclusions=(), 
     611            promote=False, outer_if_first=False, nullable=False): 
     612        """ 
     613        Returns an alias for the join in 'connection', either reusing an 
     614        existing alias for that join or creating a new one. 'connection' is a 
     615        tuple (lhs, table, lhs_col, col) where 'lhs' is either an existing 
     616        table alias or a table name. The join correspods to the SQL equivalent 
     617        of:: 
     618 
     619            lhs.lhs_col = table.col 
     620 
     621        If 'always_create' is True, a new alias is always created, regardless 
     622        of whether one already exists or not. 
    620623 
    621624        If 'exclusions' is specified, it is something satisfying the container 
     
    634637        is a candidate for promotion (to "left outer") when combining querysets. 
    635638        """ 
     639        lhs, table, lhs_col, col = connection 
    636640        if lhs is None: 
    637641            lhs_table = None