Kurt Rose
Kurt Rose
okay so I guess this is the key part: ```python class _GlomPlugin(Plugin): def get_function_hook(self, fullname: str) -> MypyType: if fullname == 'glom.core.glom': def test(ctx: FunctionContext) -> MypyType: print(ctx) print(ctx.arg_types[0][0], ctx.arg_types[1][0])...
once matching merges, scanning for `Match` specs and translating them to typing is probably the low hanging fruit ```python glom(val, ( ... , Match([int])) ) ``` completely disregarding `val` and...
oh huh.... `[enumerate]` and `Flatten()` might do the trick ```python >>> glom(['1ax', '2by', '3cz'], ([enumerate], Flatten(), Group({T[0]: [T[1]]})) ) {0: ['1', '2', '3'], 1: ['a', 'b', 'c'], 2: ['x', 'y',...
once group is released we should add this to snippets
the narrow use case was some internal stuff
this could be called "Pivot" -- since it is taking row-of-(key + val) and turning it into row-of-(key1 + key2 + ...) an explicit `Pivot()` spec that e.g. normalizes the...
maybe it could be made a BIT more general by taking a second argument of the dictionary which should be **'d into the format call (default `T`) ```python class _Format(object):...
https://github.com/mahmoud/glom/pull/131
a spec is a very straight-forward python data structure, so pickle would definitely work I'd like to get to the point of glom specs being able to mutate each other,...
here's one way you could do it ```python glom( (object_list, c_list), (Invoke(zip).star(T), Assign(T[0]['classC'], T[1]), T[0]) ) ```