gah! I hate the new string syntax

Steve Holden sholden at holdenweb.com
Mon Mar 5 21:24:14 EST 2001


"Skip Montanaro" <skip at mojam.com> wrote in message
news:mailman.983843650.6177.python-list at python.org...
>
>     Sean> Turning a string literal (";") suddenly into a string object and
>     Sean> then using its methods is not an easy read.
>
> In Python, everything is an object.  Thus, a string literal is a string
> object - no "turning into" required.  Just because it wasn't created by
> instantiating a class doesn't make it any less an object.
>
> The presence of join methods for strings and why that's where they landed
> has been hashed and rehashed several times.  Please check out FAQ 4.96 for
> details.
>
This isn't really fair, since I wrote 4.96 in response to this thread.

>     Sean> ";" . join() # in perl, this means concat ";" with the result of
>     Sean> join()
>
> Nobody ever claimed that Python was trying to be Perl... ;-) Just because
> '";".join' is a fragment of valid expressions in both languages doesn't
mean
> they have to mean the same thing.
>
> (In reality, I actually do my best to make my Perl code look as much like
> Python to my Python-infected mind as I can.)
>
just-getting-the-hang-of-this-time-machine-ly y'rs  - steve






More information about the Python-list mailing list