3 ms·
That syntax is a bit unusual, but it has the clear advantage of being far less verbose. Consider this: * The functional API is mostly for short code snippets a
by eliben 13y ago
That syntax is a bit unusual, but it has the clear advantage of being far less verbose. Consider this:
* The functional API is mostly for short code snippets and experiments in the shell. For real programs, the standard class syntax is preferred and recommended.
* namedtuple already uses the same functional API allowing space-separated members, and it's a popular tool in the stdlib. Yes, the first time you run into it it feels a bit odd, but then you get used to it and it's not a big deal.