(self, index)
return extent
The extent of the full element.

        E.g., the length of a function call or keyword.
The extent of the full element.
The extent of the full element .
def _get_extent(self, index):
        """The extent of the full element.

        E.g., the length of a function call or keyword.

        """
        extent = 0
        prev_item = get_item(self._items, index - 1)
        seen_dot = prev_item and unicode(prev_item) == '.'
        while index < len(self._items):
            item = get_item(self._items, index)
            index += 1

            if isinstance(item, (ListComprehension, IfExpression)):
                break

            if isinstance(item, Container):
                if prev_item and prev_item.is_name:
                    if seen_dot:
                        extent += 1
                    else:
                        extent += item.size

                    prev_item = item
                    continue
            elif (unicode(item) not in ['.', '=', ':', 'not'] and
                  not item.is_name and not item.is_string):
                break

            if unicode(item) == '.':
                seen_dot = True

            extent += item.size
            prev_item = item

        return extent
def _get_extent ( self , index ) : extent = 0 prev_item = get_item ( self . _items , index - 1 ) seen_dot = prev_item and unicode ( prev_item ) == '.' while index < len ( self . _items ) : item = get_item ( self . _items , index ) index += 1 if isinstance ( item , ( ListComprehension , IfExpression ) ) : break if isinstance ( item , Container ) : if prev_item and prev_item . is_name : if seen_dot : extent += 1 else : extent += item . size prev_item = item continue elif ( unicode ( item ) not in [ '.' , '=' , ':' , 'not' ] and not item . is_name and not item . is_string ) : break if unicode ( item ) == '.' : seen_dot = True extent += item . size prev_item = item return extent