On Mon, Apr 12, 2010 at 16:15, Peter <numpy-discuss...@maubp.freeserve.co.uk> wrote: > On Mon, Apr 12, 2010 at 9:52 PM, Charles R Harris > <charlesr.har...@gmail.com> wrote: >> >>> >>> Looks OK, I applied it. Could you add some documentation? >>> >> >> And maybe the filename should be the whole path? Thoughts? >> >> Chuck > > Why is the new property "filename" and not "name" to match > the way the Python handle work? e.g. > >>>> handle = open("Documents/review.pdf") >>>> handle.name > 'Documents/review.pdf' > > I concede that "filename" is more explicit, but there is something > to be said for consistency as well.
While you would expect the .name attribute of a file object to be a file name, the .name attribute an another type of object may be something different. memmap objects are quite different from file objects; we gain no particular consistency by using .name instead of .filename. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion