Here's docs: .. staticmethod:: factory(*keys)
Return a callable object that creates a dictionary from *keys* and its operands. For example: * ``dict.factory('1', 2, (3,))({1}, [2], {3: None})`` returns ``{'1': {1}, 2: [2], (3,): {3: None}}``. * ``dict.factory((3,), '1', 2)({1}, [2], {3: None})`` returns ``{(3,): {1}, '1': [2], 2: {3: None}}``. Equivalent to:: def factory(*keys): def f(*values): return dict(zip(keys, values)) return f Hope it makes my idea clearer. Link to patch (I guess it's too big to paste it here): https://github.com/sir-sigurd/cpython/commit/a0fe1a80f6e192368180a32e849771c420aa0adc 2017-09-08 19:56 GMT+05:00 Guido van Rossum <gu...@python.org>: > I think you've got it backwards -- if you send the patch the idea *may* be > accepted. You ought to at least show us the docs for your proposed factory, > it's a little murky from your example. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/