Confusing (and possibly unnecessary) change of timeOut from class-, to instance- variable makes example code more difficult to follow.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| Zancas reported | |
|---|---|
| Trac ID | trac#6845 |
| Type | defect |
| Created | 2013-11-18 23:22:07Z |
In the trial howto document:
https://twistedmatrix.com/documents/current/core/howto/trial.html#auto9
In the section on scheduling, in the example code:
listings/trial/calculus/client_2.py
"the variable "timeOut" is set as a class variable in "RemoteCalculationClient".
Later in the "Resolve a bug" section:
https://twistedmatrix.com/documents/current/core/howto/trial.html#auto12
in the closely related example code:
listings/trial/calculus/client_3.py
the instance variable "self._timeOut = 60" is assigned in the same class's init.
While both examples are coherent and produce the expected test errors/passes, the change of assignment scope for the timeOut variable is question begging, and potentially distracting from the point of the examples.
Since the variable is not assigned to elsewhere, perhaps it should remain a class variable?
Alternatively, or additionally, a mention of the change, and a justification in the expository text might help prevent confusion.
Searchable metadata
trac-id__6845 6845
type__defect defect
reporter__Zancas Zancas
priority__low low
milestone__
branch__
branch_author__
status__new new
resolution__None None
component__trial trial
keywords__documentation documentation
time__1384816927000000 1384816927000000
changetime__1384816928000000 1384816928000000
version__None None
owner__
cc__jml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the scheduling and “Resolve a bug” sections of the Trial howto, then compare listings/trial/calculus/client_2.py with listings/trial/calculus/client_3.py. Determine whether the timeOut scope change should be made consistent or explained in the documentation, and verify that the examples and related tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100