Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/207#discussion_r153343795
  
    --- Diff: aria/parser/reading/reader.py ---
    @@ -28,16 +28,9 @@ def __init__(self, context, location, loader):
     
         def load(self):
             with OpenClose(self.loader) as loader:
    --- End diff --
    
    Because `__enter__` and `__exit__` are magic functions, and it seems very 
awkward to me to have users call them directly. There are not supposed to be 
called directly. However, in this case, I do think open and close should be 
part of the class's protocol.
    
    As for using a mixin ... seems far more awkward to me than using a helper 
class. I still suggest leaving this as is.
    
    There's no new code here, too -- it's what we had for a long time.


---

Reply via email to