Questions on fsspec's API design: why was rb chosen as default mode of fsspec.open(...)?
              
              #1842
            
            
              
                Unanswered
              
          
                  
                    
                      vadimkantorov
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 1 reply
-
| Answering the second question first: we designed the result of  As for the default mode, I think this is just historical: we didn't have a text mode originally, and essentially all of the implementations only handle bytes internally. | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
In regular Python's
open(...)the default mode isr, which is equivalent tortSo for porting any code just replacing
open(...)withfsspec.open(...)is not sufficient and mode must be tweakedSame question about the context manager design: in regular python we can do
python -c 'import sys; print(open(sys.argv[1]).read())', but in fsspec result offsspec.open(...)does not have method.read(), and so we have to port to use the context manager (which by accident also does not work with one-liners:) ). Why was a decision taken to break the compat here?Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions