John J Lee wrote:
> On Thu, 26 Jan 2006, Tony Meyer wrote:
> [...]
> > Well, if you include the much larger discussion on python-list,
> > people (including me) have said that removing __div__ is a good
> > idea.  If it's included in the PEP, please at least include a
> > justification and cover the problems with it.  The vast majority of
> > people (at least at the time) were either +0 or -0, not +1.  +0's are
> > not justification for including something.
>
> <bikeshed>
>
> FWLIW, I'm definitely +1 on using / as a path join operator.

My only fear with the / operator is that we'll end up with the same
problems we have for using % in string formatting -- the order of
operations might not be what users expect.  Since join is conceptually
an addition-like operator, I would expect:

    Path('home') / 'a' * 5

to give me:

    home/aaaaa

If I understand it right, it would actually give me something like:

    home/ahome/ahome/ahome/ahome/a

I don't want to claim this is the most common use case, but I've
certainly seen auto-generated paths that look like 'a' * 20, and it
would be a pity if using the / operator for Path objects did the wrong
thing by default here...

STeVe
--
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to