Refer to the exhibit. The output of a unified diff when comparing two versions of a Python script is shown. Which two `single_request_timeout()` functions are defined in fish.py and cat.py? (Choose two.) A. B. C. D. E.
Its B+C, the answer of A+B didn't seem right so I just typed it out and actually did the diff.
Its fish.py vs cat.py
cat.py is missing the "assert" line, while fish.py has it. this is what gives it the "-"
fish.py is missing the If statement, whereas cat.py has it, that is why its a "+"
the order of the files in the diff call is important.
I stared at this endlessly and cannot figure it out. Thanks for taking the time to actually try it. I am just going to have to figure a way to memorize the answer...
Hi Guys,
To be honest with you. For the the questions is not making sense. I did not get it.
The output of a unified diff when comparing two versions of a Python script is shown. Which two `single_request_timeout()` functions are defined in fish.py and cat.py? (Choose two.).
I see the definition of single_request_timeout() in all the options provided. Maybe am missing something
The answer is B and C.
Each changed line is prepended with either a "+" or a "-" symbol. A line that is prepended with a "-" sign comes from fish.py, while a line with a "+" sign comes from cat.py. In most cases, Git picks fish.py and cat.py in such a way that you can think of fish.py/- as "old" content and cat.py/+ as "new" content.
160 - @single_request_timeout.setter
161 - def single_request_timeout(self,value):
162 - "'''The timeout (seconds) for a single HTTP REST API request."
163 - check_type(value, int, optional=True)
"-" value = this line was deleted from fish.py 164 - assert value is None or value > 0
"+" value = this line was added - 165 - if value is not None and value <= 0:
"+" value = this line was added - 166 - raise ValueError("single_request_timeout must be positive integer") self._single_request_timeout = value
167 - self._ single_request_timeout = value
arggh. Correction to the third paragrapgh in my previous comment which *should* have read:
[..]
Then as you look at the unified output below, lines starting with a corresponding '-' reference text that exists uniquely in the '--- fish.py' file (ie: "assert value is None or value > 0") whereas the IF statement beginning
if value is not None and value <= 0:
..exists in '+++ cat.py' only.
[..]
The answer is B and C.
The first most important thing to note in output from a unified diff is which file is annotated with '---' versus '+++' - namely:
--- fish.py
+++ cat.py
Then as you look at the unified output below, lines starting with a corresponding '-' reference text that exists uniquely in the '--- fish.py' file (ie: "assert value is None or value > 0") whereas the assert code exists in '+++ cat.py' only.
Secondly, note the 3rd line of output: "@@ -160,11 +160,12 @@".
The -160,12 references lines in fish.py whereas +160,12 references lines in cat.py. This excludes answer E which shows output using line numbers 172 and above.
This section is not available anymore. Please use the main Exam Page.200-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DavMan
Highly Voted 3 years, 6 months agoAlan2036
3 years, 5 months agoaprettyparrot
2 years, 6 months agorichard2865
2 years agoReadTheDoc
Highly Voted 3 years, 5 months agomenote
Most Recent 10 months agoPateras_
1 year, 1 month agotonko
9 months, 3 weeks agoRouter
1 year, 4 months agomacxsz
1 year, 6 months agoanonymous1966
1 year, 8 months agodaloslav
1 year, 8 months agodesignated
1 year, 9 months agointf_null0
2 years agointf_null0
2 years agoensxu1214
2 years, 9 months agouerdemk
2 years, 11 months agofakrulalam
2 years, 12 months agoRuley13
3 years agobpbenabd
3 years, 1 month agoNitinPathak
3 years, 3 months ago