parameters: (self, b)
docstring: Write the given bytes or bytearray object *b* to the socket
          and return the number of bytes written.  This can be less than
          len(b) if not all data could be written.  If the socket is
          non-blocking and no bytes could be written None is returned.
docstring_summary: Write the given bytes or bytearray object *b* to the socket
          and return the number of bytes written.  This can be less than
          len(b) if not all data could be written.  If the socket is
          non-blocking and no bytes could be written None is returned.
docstring_tokens: Write the given bytes or bytearray object * b * to the socket and return the number of bytes written . This can be less than len ( b ) if not all data could be written . If the socket is non - blocking and no bytes could be written None is returned .
function: def write(self, b):
          """Write the given bytes or bytearray object *b* to the socket
          and return the number of bytes written.  This can be less than
          len(b) if not all data could be written.  If the socket is
          non-blocking and no bytes could be written None is returned.
          """
          self._checkClosed()
          self._checkWritable()
          try:
              return self._sock.send(b)
          except error as e:
              # XXX what about EINTR?
              if e.args[0] in _blocking_errnos:
                  return None
              raise
function_tokens: def write ( self , b ) : self . _checkClosed ( ) self . _checkWritable ( ) try : return self . _sock . send ( b ) except error as e : # XXX what about EINTR? if e . args [ 0 ] in _blocking_errnos : return None raise