MCPcopy Index your code
hub / github.com/aws/aws-cli / write

Function write

awscli/botocore/vendored/six.py:729–740  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

727 return
728
729 def write(data):
730 if not isinstance(data, basestring):
731 data = str(data)
732 # If the file has an encoding, encode unicode with it.
733 if (isinstance(fp, file) and
734 isinstance(data, unicode) and
735 fp.encoding is not None):
736 errors = getattr(fp, "errors", None)
737 if errors is None:
738 errors = "strict"
739 data = data.encode(fp.encoding, errors)
740 fp.write(data)
741 want_unicode = False
742 sep = kwargs.pop("sep", None)
743 if sep is not None:

Callers 1

print_Function · 0.85

Calls 2

encodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected