[Python-ideas] PEP 428: poll about the joining syntax
solipsis at pitrou.net
Tue Oct 9 16:00:40 CEST 2012
Eric Snow <ericsnowcurrently at ...> writes:
> > > `p.pathjoin(q)`
> > +1
> > It is very explicit and hard to get it wrong.
> ...and it's not _that_ long a name. This would be a provisional module, so
> we could try the name on for size <wink> or hide it behind an operator later.
Or, precisely, since it's provisional, we needn't *wait* before we provide an
operator. Any stdlib module API can be augmented; what provisional modules
allow in addition to that is to modify or remove existing APIs.
So we can, say, enable Path.__truediv__ and wait for people to complain about it.
By the way, it's not new to have dual operator / method APIs. For example
set.union and set.__or__; list.extend and list.__iadd__; etc.
More information about the Python-ideas