in reply to The Law of Inconsistent Assumptions

Just a note - I prefer the sprintf-style notation of string interpolation in Python, but there are also other, less cumbersome ways:

print "Hello",foo,"." # not quite the same output but close enough print "Hello %s." % (foo) # printf-style interpolation

Manually concatenating strings is soo low-level :-)

Replies are listed 'Best First'.
Re^2: The Law of Inconsistent Assumptions
by SpanishInquisition (Pilgrim) on Oct 20, 2004 at 20:02 UTC
    Obligatory Ruby example:

    puts "This post was brought to you by the number #{ x + 75 / y} and th +e letter #{q}";

    Arbitrary code execution, variables, anything.

    If you want printf, Perl has a nicer printf than the example Python syntax. Why? It looks like printf and is therefore nice and short :)

    Regardless, a language is not about keystrokes, it's about style. Python is too wordy for me, and not automagical enough.