google/cloud/bigquery/client.py
def _check_mode(stream):
    """Check that a stream was opened in read-binary mode.

    :type stream: IO[bytes]
    :param stream: A bytes IO object open for reading.

    :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute
             and is not among ``rb``, ``r+b`` or ``rb+``.
    """
    mode = getattr(stream, 'mode', None)

    if mode is not None and mode not in ('rb', 'r+b', 'rb+'):
        raise ValueError(
            "Cannot upload files opened in text mode:  use "
            "open(filename, mode='rb') or open(filename, mode='r+b')")
Check that a stream was opened in read-binary mode.

    :type stream: IO[bytes]
    :param stream: A bytes IO object open for reading.

    :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute
             and is not among ``rb``, ``r+b`` or ``rb+``.
    
Check that a stream was opened in read-binary mode.
Check that a stream was opened in read - binary mode .
def _check_mode(stream):
    mode = getattr(stream, 'mode', None)
    if mode is not None and mode not in ('rb', 'r+b', 'rb+'):
        raise ValueError(
            "Cannot upload files opened in text mode:  use "
            "open(filename, mode='rb') or open(filename, mode='r+b')")
def _check_mode ( stream ) : mode = getattr ( stream , 'mode' , None ) if mode is not None and mode not in ( 'rb' , 'r+b' , 'rb+' ) : raise ValueError ( "Cannot upload files opened in text mode:  use " "open(filename, mode='rb') or open(filename, mode='r+b')" )
Check that a stream was opened in read-binary mode.
Check that a stream was opened in read - binary mode .
"""Check that a stream was opened in read-binary mode.

    :type stream: IO[bytes]
    :param stream: A bytes IO object open for reading.

    :raises: :exc:`ValueError` if the ``stream.mode`` is a valid attribute
             and is not among ``rb``, ``r+b`` or ``rb+``.
    """
:exc:`ValueError` if the ``stream.mode`` is a valid attribute
and is not among ``rb``, ``r+b`` or ``rb+``.
: exc : ` ValueError ` if the ` ` stream . mode ` ` is a valid attribute and is not among ` ` rb ` ` ` ` r + b ` ` or ` ` rb + ` ` .
stream
A bytes IO object open for reading.
A bytes IO object open for reading .