I come to praise .join, not to bury it...

Ype Kingma ykingma at accessforall.nl
Mon Mar 5 03:57:53 EST 2001


"Delaney, Timothy" wrote:
> 
> > I have not heard ANY _technical_ arguments opposed to
> > this last time the discussion went around -- nothing but
> > vague aesthetic, "it should be the other way", "I find it
> > ugly" kind of complaints.  Unless and until further notice,
> > then, I class these together with the complaints of people
> > who dislike 0-based indexing, on similar vague bases -- as
> > 0-based indexing _works_ better than 1-based, then, for
> > me, it is a superior choice.  Aesthetics is in the eye of the
> 
> I truly have no complaints with the technical merits of ''.join().
> 
> However, I have *severe* complaints with the aesthetics and consistency.
> Quite simply, the way we look at things tends to be
> 
> "result" = "thing to be acted on to get the result" modified by "thing which
> does the action"
> 

Consider an alternate view:

"result" = "thing that will provide the result" modified by
                    "the action, ie. what thing should do"

> This is consistently followed in the standard python libraries in almost all
> cases ... but ''.join() is a glaring inconsistency. As a result, it seems
> unintuitive and ugly.

In the alternative view ''.join() reads like:

    O yee empty string, please join this list of things.

Would you call that inconsistent?

The difference between the two views is
one of the differences between "procedural" and OO.

After getting used to OO I even found it aesthetic.

Regards,
Ype

-- email at xs4all.nl



More information about the Python-list mailing list