Nov-10-2019, 05:21 AM
i want to make my own context manager. maybe more than one. i'm reading docs for module contextmanager but it seems to not be very thorough. the first one i want to make is to be file-object-like object. that is, it should be usable like a file object, including as a context manager (so its creator can be used in a with statement in place of open(). this is one reason i haven been reading up on file-object methods (to see what all i need to implement.