Re:PEP 435 Accepted – Adding an Enum type to the Python stan...
by eliben on Saturday May 11, 2013 @10:05AM
(#5690601)
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.
* 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.