Skip to content

Comment on Keyword Arguments: Ruby, Clojure, Common Lispparent

Comments

Python's argument conventions are even more flexible; they actually work by passing a tuple of positional arguments and a dictionary of keyword arguments, and unpacking/repacking according to the signature of each function. You can pass any iterable as positional arguments and any mapping as keyword arguments. You can also retrieve the positional and keyword arguments inside a callable as a tuple and dictionary. It's the best calling convention I've ever seen.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.