parameters: (obj)
return_statement: return u(obj, errors='replace')
docstring: Take a bytes or str path and cast it to unicode.
  
      Apparently it is perfectly fine to pass both byte and unicode objects into
      the sys.path. This probably means that byte paths are normal at other
      places as well.
  
      Since this just really complicates everything and Python 2.7 will be EOL
      soon anyway, just go with always strings.
docstring_summary: Take a bytes or str path and cast it to unicode.
docstring_tokens: Take a bytes or str path and cast it to unicode .
function: def cast_path(obj):
      """
      Take a bytes or str path and cast it to unicode.
  
      Apparently it is perfectly fine to pass both byte and unicode objects into
      the sys.path. This probably means that byte paths are normal at other
      places as well.
  
      Since this just really complicates everything and Python 2.7 will be EOL
      soon anyway, just go with always strings.
      """
      return u(obj, errors='replace')
function_tokens: def cast_path ( obj ) : return u ( obj , errors = 'replace' )