
import stl.ascii
import stl.binary


def parse_ascii_file(file):
    return stl.ascii.parse(file)


def parse_binary_file(file):
    return stl.binary.parse(file)


def parse_ascii_string(data):
    from StringIO import StringIO
    return parse_ascii_file(StringIO(data))


def parse_binary_string(data):
    from StringIO import StringIO
    return parse_binary_file(StringIO(data))


import stl.ascii
import stl.binary


def read_ascii_file(file):
    return stl.ascii.parse(file)


def read_binary_file(file):
    return stl.binary.parse(file)


def read_ascii_string(data):
    from StringIO import StringIO
    return parse_ascii_file(StringIO(data))


def read_binary_string(data):
    from StringIO import StringIO
    return parse_binary_file(StringIO(data))

Rename the reading functions "read_" rather than "parse_".
Rename the reading functions "read_" rather than "parse_".

"Parsing" is what they do internally, but "read" is a better opposite to
"write" and matches the name of the underlying raw file operation.

  
  import stl.ascii
  import stl.binary
  
  
- def parse_ascii_file(file):
+ def read_ascii_file(file):
      return stl.ascii.parse(file)
  
  
- def parse_binary_file(file):
+ def read_binary_file(file):
      return stl.binary.parse(file)
  
  
- def parse_ascii_string(data):
+ def read_ascii_string(data):
      from StringIO import StringIO
      return parse_ascii_file(StringIO(data))
  
  
- def parse_binary_string(data):
+ def read_binary_string(data):
      from StringIO import StringIO
      return parse_binary_file(StringIO(data))
  
Rename the reading functions "read_" rather than "parse_".
## Code Before:

import stl.ascii
import stl.binary


def parse_ascii_file(file):
    return stl.ascii.parse(file)


def parse_binary_file(file):
    return stl.binary.parse(file)


def parse_ascii_string(data):
    from StringIO import StringIO
    return parse_ascii_file(StringIO(data))


def parse_binary_string(data):
    from StringIO import StringIO
    return parse_binary_file(StringIO(data))

## Instruction:
Rename the reading functions "read_" rather than "parse_".
## Code After:

import stl.ascii
import stl.binary


def read_ascii_file(file):
    return stl.ascii.parse(file)


def read_binary_file(file):
    return stl.binary.parse(file)


def read_ascii_string(data):
    from StringIO import StringIO
    return parse_ascii_file(StringIO(data))


def read_binary_string(data):
    from StringIO import StringIO
    return parse_binary_file(StringIO(data))
