Tuesday, March 31, 2015

Simplification vs usability

When one designs library/API/whatever, there are two things that one always cares of: flexibility and minimalism. Good solutions incorporate both these points, but sometimes one has to sacrifice some 'very useful feature' for the sake of simplicity of system.

Ok, this was just to say: I'm disappointed by PEP-3113
https://www.python.org/dev/peps/pep-3113/

It's already implemented in python3 and it removes tuple unpacking in arguments.
Yes, this cool feature is inavalibale in python3:

map( lambda id, (key, group): (len(group), key), data)

Problems with annotations are understandable, but there is category of applications when automatic untupling is very handy and annotations are not needed.

No comments :