News for hackers. Stuff that matters.

throwaway91919

Re:Where are we in the Python 3 transition? on Friday January 01, 2016 @05:38PM (#10823834)
Ah, thanks.
Re:Where are we in the Python 3 transition? on Friday January 01, 2016 @05:04PM (#10823697)
Can you (or someone) clarify what problem you're talking about? This seems to work as expected for me:

    def foo(x=[]):
        sum = 0
        for a in x: sum += a
        return sum
    print foo([3,5])  # 8
    print foo(x=[3]) # 3
    print foo([]) # 0
    print foo() # 0
Is it the fact that kwargs are required to have defaults? Or what?