Return a name,value pair for the next attribute in the stream,
        if one is found, or None
556148
def getAttribute(self):
        """"""
        data = self.data
        # Step 1 (skip chars)
        c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
        assert c is None or len(c) == 1
        # Step 2
        if c in (b">", None):
            return None
        # Step 3
        attrName = []
        attrValue = []
        # Step 4 attribute name
        while True:
            if c == b"=" and attrName:
                break
            elif c in spaceCharactersBytes:
                # Step 6!
                c = data.skip()
                break
            elif c in (b"/", b">"):
                return b"".join(attrName), b""
            elif c in asciiUppercaseBytes:
                attrName.append(c.lower())
            elif c is None:
                return None
            else:
                attrName.append(c)
            # Step 5
            c = next(data)
        # Step 7
        if c != b"=":
            data.previous()
            return b"".join(attrName), b""
        # Step 8
        next(data)
        # Step 9
        c = data.skip()
        # Step 10
        if c in (b"'", b'"'):
            # 10.1
            quoteChar = c
            while True:
                # 10.2
                c = next(data)
                # 10.3
                if c == quoteChar:
                    next(data)
                    return b"".join(attrName), b"".join(attrValue)
                # 10.4
                elif c in asciiUppercaseBytes:
                    attrValue.append(c.lower())
                # 10.5
                else:
                    attrValue.append(c)
        elif c == b">":
            return b"".join(attrName), b""
        elif c in asciiUppercaseBytes:
            attrValue.append(c.lower())
        elif c is None:
            return None
        else:
            attrValue.append(c)
        # Step 11
        while True:
            c = next(data)
            if c in spacesAngleBrackets:
                return b"".join(attrName), b"".join(attrValue)
            elif c in asciiUppercaseBytes:
                attrValue.append(c.lower())
            elif c is None:
                return None
            else:
                attrValue.append(c)
552814
def _get_value_for_serialization(self, data, name, spec):
        
        name = self.property_name_map[name]
        return getattr(data, name, None)
638674
public static String getNextStreamID() {
        StringBuilder buffer = new StringBuilder();
        buffer.append(STREAM_INIT_PREFIX);
        buffer.append(randomGenerator.nextInt(Integer.MAX_VALUE) + randomGenerator.nextInt(Integer.MAX_VALUE));

        return buffer.toString();
    }
1251398
def next(self):
        
        if self.col < self.data.num_attributes:
            index = self.col
            self.col += 1
            return self.data.attribute(index)
        else:
            raise StopIteration()
121034
def _read_next_line(self):
        """"""
        prev_line = self._line
        self._line = self.stream.readline()
        return prev_line
1227732
def attinq(self, attribute=None):
        
        position = self._first_adr
        if isinstance(attribute, str):
            for _ in range(0, self._num_att):
                name, next_adr = self._read_adr_fast(position)
                if name.strip().lower() == attribute.strip().lower():
                    return self._read_adr(position)

                position = next_adr
            raise KeyError('No attribute {}'.format(attribute))

        elif isinstance(attribute, int):
            if (attribute < 0 or attribute > self._num_zvariable):
                raise KeyError('No attribute {}'.format(attribute))
            for _ in range(0, attribute):
                name, next_adr = self._read_adr_fast(position)
                position = next_adr

            return self._read_adr(position)
        else:
            print('Please set attribute keyword equal to the name or ',
                  'number of an attribute')

            attrs = self._get_attnames()
            print(attrs)
            for x in range(0, self._num_att):
                name = list(attrs[x].keys())[0]
                print('NAME: ' + name + ', NUMBER: ' + str(x) + ', SCOPE: ' + attrs[x][name])
            return attrs
1156566
def _name_value(self, s):
        """"""
        parts = s.split(b' ', 2)
        name = parts[0]
        if len(parts) == 1:
            value = None
        else:
            size = int(parts[1])
            value = parts[2]
            still_to_read = size - len(value)
            if still_to_read > 0:
                read_bytes = self.read_bytes(still_to_read)
                value += b'\n' + read_bytes[:still_to_read - 1]
        return (name, value)
91488
def next(self):
        """"""
        _LOGGER.debug("reading next")
        if self.closed:
            _LOGGER.debug("stream is closed")
            raise StopIteration()

        line = self.readline()
        if not line:
            _LOGGER.debug("nothing more to read")
            raise StopIteration()

        return line
964530
protected AttributeList getAttributeList() throws IOException {
        int i;
        int quote;
        String name = null;
        String value = null;
        StringBuilder buffer = new StringBuilder();
        Map<String, String> attributes = new LinkedHashMap<String, String>();
        Stream stream = this.stream;

        while(true) {
            // skip invalid character
            while((i = stream.peek()) != Stream.EOF) {
                if(Character.isLetter(i) || Character.isDigit(i) || i == ':' || i == '-' || i == '_' || i == '%' || i == '/' || i == '>') {
                    break;
                }
                else {
                    stream.read();
                }
            }

            // check end
            if(i == Stream.EOF) {
                break;
            }

            if(i == '>') {
                break;
            }
            else if(i == '%' || i == '/') {
                if(stream.peek(1) == '>') {
                    break;
                }
                continue;
            }
            else {
            }

            // read name
            while((i = stream.peek()) != -1) {
                if(Character.isLetter(i) || Character.isDigit(i) || i == ':' || i == '-' || i == '_') {
                    buffer.append((char)i);
                    stream.read();
                }
                else {
                    break;
                }
            }

            name = buffer.toString();
            buffer.setLength(0);

            if(name.length() < 1) {
                continue;
            }

            this.stream.skipWhitespace();
            i = this.stream.peek();

            // next character must be '='
            if(i != '=') {
                attributes.put(name, "");
                continue;
            }
            else {
                this.stream.read();
            }

            this.stream.skipWhitespace();
            i = stream.peek();

            if(i == '"') {
                quote = '"';
                stream.read();
            }
            else if(i == '\'') {
                quote = '\'';
                stream.read();
            }
            else {
                quote = ' ';
            }

            if(quote == ' ') {
                value = this.getAttributeValue(buffer);
            }
            else {
                value = this.getAttributeValue(buffer, quote);
            }
            attributes.put(name, value);
            buffer.setLength(0);
        }
        this.stream.skipWhitespace();
        return this.getAttributeList(attributes);
    }
157870
def fetch(self, value_obj=None):
        '''  '''
        val = None
        try:
            val = next(self.__iterable)
        except StopIteration:
            return None
        if value_obj is None:
            value_obj = Value(value=val)
        else:
            value_obj.value = val
        return value_obj
447364
public Iterator getAttributeNames() {
        if (!_iSess.isValid())
            throw new IllegalStateException();
        Iterator value = null;
        if (_iSess != null) {
            ArrayList list = new ArrayList();
            for (Enumeration e = _iSess.getAttributeNames(); e.hasMoreElements();) {
                list.add(e.nextElement());
            }
            value = list.iterator();
        }
        return value;
    }
418656
def extract_noindex
      noindex_name, noindex_value = extract_noindex_attribute(:noindex)
      index_name, index_value = extract_noindex_attribute(:index)

      nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
      follow_name, follow_value = extract_noindex_attribute(:follow)

      noindex_attributes = if noindex_name == follow_name && (noindex_value || follow_value)
                             # noindex has higher priority than index and follow has higher priority than nofollow
                             [
                               [noindex_name, noindex_value || index_value],
                               [follow_name, follow_value || nofollow_value],
                             ]
                           else
                             [
                               [index_name, index_value],
                               [follow_name, follow_value],
                               [noindex_name, noindex_value],
                               [nofollow_name, nofollow_value],
                             ]
                           end
      append_noarchive_attribute group_attributes_by_key noindex_attributes
    end
70635
def reader(stream, fieldnames=None):
    """"""
    if not fieldnames:
        fieldnames = load_line(stream.readline())
    for line in stream:
        values = load_line(line)
        item = Item()
        item.__dict__ = dict(zip(fieldnames, values))
        yield item
1100398
def get(self, name):
        
        parameter = next((p for p in self.parameters if p.name == name), None)
        if parameter is None:
            raise LookupError("Cannot find parameter '" + name + "'.")
        return parameter
1177610
def get_next(self):
        
        self._counter_curr += 1

        suffix = self._separator + "%s" % str(self._counter_curr)

        return self._base_name + suffix
1251042
private void readInstance(StreamTokenizer tokenizer, AttributeDataset data, Attribute[] attributes) throws IOException, ParseException {
        double[] x = responseIndex >= 0 ? new double[attributes.length - 1] : new double[attributes.length];
        double y = Double.NaN;
        
        // Get values for all attributes.
        for (int i = 0, k = 0; i < attributes.length; i++) {
            // Get next token
            if (i > 0) {
                getNextToken(tokenizer);
            }

            if (i == responseIndex) {
                if (tokenizer.ttype == '?') {
                    y = Double.NaN;
                } else {
                    y = attributes[i].valueOf(tokenizer.sval);
                }
            } else {
                if (tokenizer.ttype == '?') {
                    x[k++] = Double.NaN;
                } else {
                    x[k++] = attributes[i].valueOf(tokenizer.sval);
                }
            }
        }

        if (Double.isNaN(y)) data.add(x); else data.add(x, y);
    }
348742
def getAttributeNames(self):
        '''
        '''
        return map(lambda e: self.getAttributeName(e.name), self.tcListElements)