News for hackers. Stuff that matters.
Re:Learn Python in minutes by chrismorgan on Friday June 28, 2013 @09:51PM (#5961243)
An error: *args arrive as a tuple, not a list, so the first line that all_the_args(1, 2, a=3, b=4) prints is not:

    [1, 2]
but is instead

    (1, 2)
The second line of that output also happens to be wrong, because printing a dictionary uses repr() on its keys and values and str.__repr__ normally uses single quotes, so instead of

    {"a": 3, "b": 4}
It will instead print

    {'a': 3, 'b': 4}
For that matter, I would prefer it if this guide used single quotes primarily; that is the preferred standard in Python.

There are no comments on this comment yet.