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

Steve Williams stevewilliams at wwc.com
Wed Mar 7 17:08:12 EST 2001


D-Man wrote:

> On Tue, Mar 06, 2001 at 09:46:53AM -0500, Mike C. Fletcher wrote:
>

> [snip]

> Even with my newfound understanding, provided by the Martellibot, I
> agree with this.  Calling a method on an object is fine.  Calling it
> on a literal looks weird.  Take for example something like this
>
> three = 1.__add__( 2 )
>
> ;-)
>
> Continuing on into the darkness:

ten = +.join(1,2,3,4)

and

sixfactorial = *.join(range(1,7))

Since + and * are not quoted, it's clear that 'join' is an 'arithmetic
join'--polymorphism, doncha know.

And howsabout

   RatherLargeNumber ==  **.join(xrange(100))

The mind boggles.




More information about the Python-list mailing list