On Tue, Sep 23, 2014 at 2:37 PM, Tarek Ziadé <tarek@ziade.org> wrote:
Le 23/09/14 14:32, Tarek Ziadé a écrit : [...]
~ is a Unix notion I think, and since expanduser() works under Windows, I don't think it's that intuitive and explicit.
Unless we'd change it so we omit "~" =>
e.g. os.path.expanduser() and os.path.expanduser('specificuser') I would even say that the api name "expanduser" is redundant with the fact that you absolutely need to pass a '~' as a first char if you want it to do something at all.
The more I think about it, the more I find it unintuitive
What about something like os.path.homedir or os.homedir? You could use, for example, homedir() to get the home directory of the current user, and homedir('username') to get the home directory of a given user (if that is possible).