Named arguments: C# vs Python -
Both C # and Python allow the designated arguments, so that you can write something like this: foo (bar) : 1)
. This is great, especially in combination with alternative arguments.
My question is: What are the differences between C # and Python, if any? I do not have any interest in what is "best", but there are differences and possible motivations behind these differences.
And if someone knows the differences with other languages "This feature (ruby or purpose-maybe, maybe), it can also be interesting.
Edit to create CommunityWiki
Not only does Python allow you to capture the given logic of the unspecified name in a specific word, but instead lets you open a trunk in the arguments:
& gt; & Gt; & Gt; Diff F (alpha, beta, gamma): ... print alpha, beta, gamma ... & gt; & Gt; & Gt; F (** {'alpha': 1, 'beta': 2, 'gamma': 3}) 1 2 3
and pass them the stream below:
< Previous> & gt; & Gt; & Gt; Diff G (** quargus): ... f (** quargus) ... & gt; & Gt; & Gt; G (** {'alpha': 1, 'beta': 2, 'gamma': 3}) 1 2 3
Comments
Post a Comment