What is exactly a file-like object in Python?

后端 未结 4 1727
说谎
说谎 2020-12-31 03:15

In http://docs.python.org/library/json.html:

simplejson.load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_

4条回答
  •  遥遥无期
    2020-12-31 03:26

    simplejson has the calls loads and dumps that consumes and produce strings instead of file like objects.

    This link has an example in the context of StringIO and simplejson for both file-like and string objects.

    http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.3/docs/index.html

提交回复
热议问题