i can't hold back anymore. python is truely idiotic.

in python, you can define a function with unspecified number of unnamed keyword parameters

like this:

# -*- coding: utf-8 -*-
# python

# use 「**‹name›」 to receive unspecified number of keyword arguments
def ff(**ddd):
    # ddd is received as a dictionary
    return ddd

print ff( z = 8, c = 7, aa = 4, b = 3) # {'aa': 4, 'c': 7, 'z': 8, 'b': 3}

but, why'd anyone want to do that? No language i know of that lets one define, read:

 unspecified number
 but Named parameters

But let's say we do need it. But in that case, just pass one dictionary!

that's much simpler.

what's more, is that python also lets you define unspecified number of positional parameters, as well as keyword parameters, as well as any of all the above mixed.

Wow, more power to the coder. But, really? It gets very hairy. Each way you define them, your function receives the arg in different way. You function may need to process a n-tuple data type, or hash table. Also, in the definition, the parameter needs to be in a particular order.

so, in summary, the syntax is complex, each case has a special form, and the semantics is complex, each case your function body need to process the args in a different way.

complexer and complexer.

really, positional param and keyword param is sufficient. When needed, programer can pass list or hash table. That really solves all problems, yet without introducing any complexity to the lang's syntax & semantics.

Python: Function with Optional Parameter, Named Parameter, Infinite Parameters
Shared publiclyView activity