Feature #1140
Implement context manager protocol for participants
Status: | Resolved | Start date: | 08/16/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | Python | |||
Target version: | rsb-0.10 |
Description
So one can write
with rsb.createListener('/bla/') as listener:
...
Related issues
Associated revisions
refs #1140: describe context manager protocol
In line with the addition of the context manager protocol to rsb and the
use in the examples, describe it in the manual.
Merge branch 'feature-1140'
fixes #1140: implement context manager protocol
Added context manager support (with statements) to participants.
Merge branch 'feature-1140'
History
#1 Updated by J. Moringen over 10 years ago
- Target version changed from rsb-0.9 to rsb-0.10
#2 Updated by J. Wienke over 9 years ago
- Status changed from New to In Progress
- Assignee set to J. Wienke
#3 Updated by J. Wienke over 9 years ago
- % Done changed from 0 to 80
I have added an implementation in a feature branch. Can someone please review the proposed changes?
#4 Updated by J. Moringen over 9 years ago
Looks good. Some minor points:
- The
print
statement in the unit test could be removed - The example programs in the examples/ directory should be updated
- If necessary, the manual should be updated
#5 Updated by J. Wienke over 9 years ago
- % Done changed from 80 to 90
I have done all of this. Can you have a look again?
#6 Updated by J. Moringen over 9 years ago
Probably a nitpick but in the manual "context manager protocol" should probably link to the Python documentation since not every user will know the term. Also, listener, informer, etc. should be :term:listener
, :term:informer
, etc.
#7 Updated by J. Wienke over 9 years ago
Changed ;)
#8 Updated by J. Wienke over 9 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Applied in changeset rsb-python|commit:19fa6293af76e806cc50b3c2dbd4d0f6737e46bd.