Mar-10-2019, 01:20 AM
so you're saying I don't need line 29? That this if\else\elif should be right underneath the _init_ statement?
I was writing this according to the specifics below. I guess reading it wrong because what you said makes sense. According to the instructions below, I thought I had to have def_discover. This is where I am getting confused on where/how to put it.
__init__()
TextAnalyzer objects are instantiated by passing in one of the following to the src parameter:
A valid URL beginning with "http"
A path to a text file ending with the file extension "txt"
A string of text
The __init__() method also includes a src_type parameter, which is used to specify the type of the src argument. Options are:
discover (default) - You must write code to discover the type of src.
If the src begins with "http", it is a url.
If the src ends in "txt", it is a path.
Otherwise, it is text.
url
path
text
You should set self._src_type, self._content, and self._orig_content in the __init__() method.
I was writing this according to the specifics below. I guess reading it wrong because what you said makes sense. According to the instructions below, I thought I had to have def_discover. This is where I am getting confused on where/how to put it.
__init__()
TextAnalyzer objects are instantiated by passing in one of the following to the src parameter:
A valid URL beginning with "http"
A path to a text file ending with the file extension "txt"
A string of text
The __init__() method also includes a src_type parameter, which is used to specify the type of the src argument. Options are:
discover (default) - You must write code to discover the type of src.
If the src begins with "http", it is a url.
If the src ends in "txt", it is a path.
Otherwise, it is text.
url
path
text
You should set self._src_type, self._content, and self._orig_content in the __init__() method.