Proposal: s1.intersects(s2)

Christoph Zwerschke cito at online.de
Thu Jul 5 15:16:36 EDT 2007


Nis Jørgensen wrote:
> The problem is, these functions can be read as "X is [consisting only
> of] digit[s]", "X is lower [case]" etc, where the bits in brackets have
> been removed for brewity. In the case of "s1 is intersect s2" there is
> no way I can see of adding words to get a correct sentence. The
> "obvious" naming is "s1.intersects(s2)" which reads as "s1 intersects
> s2", a perfectly cromulent sentence.

Agree. A possible alternative would be "s1.hasintersection(s2)", but 
s1.intersects(s2) is ok as well.

-- Chris



More information about the Python-list mailing list