ENع
الدرس 11 · Collections and functions

Arguments: defaults, *args and **kwargs

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

When you call a function, Python hands each value you pass to one of its parameters. Follow one function, order(drink, size="S", *extras, **notes), through three calls and watch the values land in its boxes: by position, by name, from a default, and the leftovers packed into a tuple and a dict. Finish with the error you get when a required value is missing, and the two ordering rules Python enforces.

12 دقيقة10 خطوات5 أسئلةBeginner
شكل 11 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.