Hi -

It looks like Python 'os.path.commonprefix' returns the version including foo, 
in your example.
I personally wonder if that should just be *string* commonprefix and if *path* 
commonprefix should
return only whole path components.

Anybody have a sense for where this might be used - and if so, which 
interpretation is
more likely to be useful? Or why the Python library is this way?

Thanks,

-michael

    Hi! 
    
    My teammate and I are applying in this project for RGSoC this year. 
    
    We have worked on the commonPrefix function for the Path library and have 
implemented it differently from what was originally proposed and would like to 
discuss the same.
    
    
    The function was originally proposed to take a list of strings (paths) as 
input and return the longest common path prefix. Thus, if given a list of paths 
like '/Users/foo.chpl', '/Users/foo.good' the function would return 
'/Users/foo' which is not a valid path.
    
    
    Instead, our implementation of the function returns only valid path 
prefixes ('/Users' in this case).
    
    
    So, we would like know how reasonable would this approach be and would it 
be preferable to have both implementations?
    
    
    Thanks,
    
    Unnati and Prithvi  
    
    

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to