Definitionپێناسە
An written as name=value, so it goes to the with that name, in any order: print_area(height=3, width=2). In a call, all must come before the keyword arguments.
کە بە شێوەی name=value دەنووسرێت، بۆیە بە هەر ڕیزبەندییەک بێت دەچێتە ئەو هەمان ناوی هەیە: print_area(height=3, width=2). لە هەموو دەبێت پێش ئارگیومێنتە ناودارەکان بن.
Exampleنموونە
The names decide where the values go, so the order does not matter; a positional argument after a keyword argument is a SyntaxError.
ناوەکان دیاری دەکەن نرخەکان بۆ کوێ دەچن، بۆیە ڕیزبەندی گرنگ نییە؛ دوای ئارگیومێنتێکی ناودار SyntaxError دەدات.
def print_area(width=1, height=2):
print(width * height)
print_area(height=3, width=2) # 6
# print_area(width=2, 3) -> SyntaxErrorOther Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
ئارگیومێنتە ناودارەکە، ئارگیومێنتە ناودارەکان، ئارگیومێنتێکی ناودار
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
A named (ناودار) argument: 'keyword' here means the parameter's name, not a reserved keyword (وشەی کلیلەیی), so a word-for-word translation is avoided. Proposed.
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- Positional, Keyword and Default Argumentsئارگیومێنتە شوێنییەکان، ئارگیومێنتە ناودارەکان و نرخە بنەڕەتییەکان
- Defining and Calling Functionsناساندن و بانگکردنی کردارەکان
- Input and Outputنێوخستە و دەرخستە
- Return Values and Noneنرخە گەڕاوەکان و None
- Tuples, Sets and Dictionariesتاپڵەکان، کۆمەڵەکان و فەرهەنگەکان
- Python Next to JavaPython لە تەنیشت Javaـەوە
- Dart Functions and Collectionsکردارەکان و کۆکراوەکانی Dart