A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-January/019455.html below:

[Python-Dev] PEP 216 (string interpolation) alternative EvalDict

[Python-Dev] PEP 216 (string interpolation) alternative EvalDict [Python-Dev] PEP 216 (string interpolation) alternative EvalDictSkip Montanaro skip@pobox.com
Mon, 14 Jan 2002 16:39:16 -0600
    Paul> Sorry I wasn't clear. Let's say it's the second hour of our
    Paul> Perl/Python class.

    Paul> Here's Perl:

    Paul> $a = 5;
    Paul> $b = 6;
    Paul> print "$a $b";

    ...

    Paul> Here's Python:

    Paul> a = 5;
    Paul> b = 6;
    Paul> print "%(a)s %(b)s" % vars()

So?  There are some things Perl does better than Python, some things Python
does better than Perl.  Maybe this is a (small) notch in Perl's gun.  It
just doesn't seem significantly better enough to me to warrant a language
change.  I would have written the Python example as

    print a, b

For the simple examples that would normally arise in an introductory
programming class, I think Python's print statement works just fine.  For
more hairy cases, Perl probably wins.  That's life.

but-that's-just-me-ly, y'rs,

-- 
Skip Montanaro (skip@pobox.com - http://www.mojam.com/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4