Charles-François Natali <neolo...@free.fr> added the comment: > It would probably be simpler, safer and more efficient to simply call > the POSIX function instead (but it most be exposed somewhere, by > posixmodule.c I suppose).
Indeed. > Would it be a good idea to use the full docstring of posixpath.realpath > to os.realpath and then just do “realpath = os.realpath” in posixpath? Yes. That would also be a way to add the '.' default argument. > An initial patch. I'm actually concerned because realpath doesn't seem as portable as I first thought. Here's what my man page says: """ OSIX.1-2001 says that the behavior if resolved_path is NULL is implementation-defined. POSIX.1-2008 specifies the behavior described in this page. """ So I'm not sure that all implementations support passing a NULL buffer as argument. Also: """ Solaris may return a relative pathname when the path argument is relative. """ Well, I guess we can also commit this patch and see if a buildbot breaks... ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12801> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com