News for hackers. Stuff that matters.
Re:Glom – Restructured Data for Python by spedru on Wednesday May 09, 2018 @07:48PM (#17035312)
I'm not really versed in the idioms/social mores of Python, so please take the following with a grain of salt:

This seems like it usefully solves a problem, but the invocation pattern is suspect to me -- Instead of "glom" taking the target for picking-apart plus a magic little bit of DSL, what if "glom" took a single parameter, the aforementioned DSL, and returned a function that would perform the corresponding search when called on a target? Even if Python or this package optimises away repeatedly searching (by the same spec|in the same manner), the convention the package prescribes is odd to me, right after the first few paragraphs of intro.

Re:Glom – Restructured Data for Python by mhashemi on Wednesday May 09, 2018 @07:51PM (#17035330)
The big, classical school of Python definitely prefers top-level functions. Still, I definitely understand that aesthetic, and am on board with not using functools.partial to achieve it. So: https://github.com/mahmoud/glom/issues/14 :)
Re:Glom – Restructured Data for Python by seanc on Wednesday May 09, 2018 @08:00PM (#17035382)
Python regex library does this, optionally
Re:Glom – Restructured Data for Python by daturkel on Wednesday May 09, 2018 @10:02PM (#17035909)
Similarly, statistical distributions in SciPy can be used in "frozen" form (pre-parameterized) or in a more general form where you supply the parameters at the same time you are requesting some attribute it the distribution. Seems to me to be a situation where one is useful if you expect reuse, and the other is useful if you don't.