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

D-Man dsh8290 at rit.edu
Wed Mar 7 17:46:46 EST 2001


On Wed, Mar 07, 2001 at 10:19:25PM +0000, Grant Edwards wrote:
| In article <mailman.983997159.4842.python-list at python.org>, D-Man wrote:
| 
| >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.
| 
| What makes you think a "literal" is not an object?

Literals are special syntax for creating objects.  So they are
objects, they just look different.  I guess a better way of expressing
it is "Calling a method on a named object is fine." except it doesn't
cover objects returned by a ctor that aren't named yet.

(just for an example)
>>> from UserString import UserString
>>> UserString( "." ).join( ['a' , 'b' , 'c' ] )

-D





More information about the Python-list mailing list