Le 23/09/14 09:52, Giampaolo Rodola' a écrit :


On Tue, Sep 23, 2014 at 9:19 AM, Tarek Ziadé <tarek@ziade.org> wrote:
Hello

I realize I am using a lot this pattern:

   >>> os.path.join(os.path.expanduser('~'), 'something', 'here')
   '/Users/tarek/something/here'


It's quite complicated, and not really intuitive.

I don't find that complicated, just a bit verbose perhaps, but it's definitively clear what it's doing and it is also explicit.
~ 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')

Cheers
Tarek