On Fri, Oct 22, 2021 at 10:52 PM tbp1...@gmail.com <tbp100...@gmail.com> wrote:
> In get_files(), there is > > os.path.splitext(str(z))[1].lower() in self.extensions > > I'm just wondering why it isn't g.os_path_splitext() instead. Are these > *g.os_path_** commands being phased out? (Actually, I never understood > why we have them at all but given that we do, why not use it here?) > Good question. The g.os_path functions have a long history. Iirc, at one point they were an essential part of the wrappers that hid differences between python 2 and python 3. Today, *some* of the g.os_path functions do more than the corresponding os.path methods. The differences between the g.os_path functions and the corresponding os.path methods are subtle enough that it would be madness to contemplate removing the g.os_path functions. But for most scripts using os.path methods directly is clearer. So that's what I do. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS2pd5pvf4-tqrbde9Tm0V56%3D0ONfyFj_YmC7gWy_cAQFA%40mail.gmail.com.