parameters: (self, dock)
return_statement: return None
docstring: Returns the partner dock for the input dock.
  
          :param `dock`: a :class:`AuiDockInfo` instance.
docstring_summary: Returns the partner dock for the input dock.
docstring_tokens: Returns the partner dock for the input dock .
function: def GetPartnerDock(self, dock):
          """
          Returns the partner dock for the input dock.
  
          :param `dock`: a :class:`AuiDockInfo` instance.
          """
  
          for layer in xrange(dock.dock_layer, -1, -1):
  
              bestDock = None
  
              for tmpDock in self._docks:
  
                  if tmpDock.dock_layer != layer:
                      continue
  
                  if tmpDock.dock_direction != dock.dock_direction:
                      continue
  
                  if tmpDock.dock_layer < dock.dock_layer:
  
                      if not bestDock or tmpDock.dock_row < bestDock.dock_row:
                          bestDock = tmpDock
  
                  elif tmpDock.dock_row > dock.dock_row:
  
                      if not bestDock or tmpDock.dock_row > bestDock.dock_row:
                          bestDock = tmpDock
  
              if bestDock:
                  return bestDock
  
          return None
function_tokens: def GetPartnerDock ( self , dock ) : for layer in xrange ( dock . dock_layer , - 1 , - 1 ) : bestDock = None for tmpDock in self . _docks : if tmpDock . dock_layer != layer : continue if tmpDock . dock_direction != dock . dock_direction : continue if tmpDock . dock_layer < dock . dock_layer : if not bestDock or tmpDock . dock_row < bestDock . dock_row : bestDock = tmpDock elif tmpDock . dock_row > dock . dock_row : if not bestDock or tmpDock . dock_row > bestDock . dock_row : bestDock = tmpDock if bestDock : return bestDock return None