bskinn / stdio-mgr

Context manager for mocking/wrapping stdin/stdout/stderr
MIT License
14 stars 4 forks source link

Integrate 'safe-close' and 'non-safe-close' functionality into single RandomTextIO/TeeStdin classes #37

Open bskinn opened 5 years ago

bskinn commented 5 years ago

jayvdb:

This could mean the separate 'safe' versions of the classes are not necessary. I was toying with that idea before creating those safe classes, but went with those safe classes so that the caller can see that close=False gives them a more raw wrapper. But it does feel like there is more value now in having 'safe-close'/other-side-effects mode be dynamic.