4 ms·
Also, most data scientists presumably have some advanced math background so it's akin to reading set-builder notation (albeit with listcomps the sets are someti
by wenc 6y ago
Also, most data scientists presumably have some advanced math background so it's akin to reading set-builder notation (albeit with listcomps the sets are sometimes nested). Your listcomp reads:
{x : y ∈ z, x ∈ zz | y ∈ x}
If you've read enough statistics/ML papers, this becomes second nature.
- JNRowe 6y ago> If you've read enough statistics/ML papers, this becomes second nature. As someone who breathes that style of notation, there is excellent support in vim and emacs for custom display for readability. Conceal syntax in vim¹(builtin for rust/help/$few_others and external such as vim-cute-python²), and pretty-mode³ in emacs. I'm sure similar things exist in other editors too, but I don't use those ;) You don't get the exact representation in your example with the things I've mentioned, but if you're used to a more "mathy"-style they really are quite nice. YM[and taste]MV. 1. http://vimdoc.sourceforge.net/htmldoc/syntax.html#conceal http://vimdoc.sourceforge.net/htmldoc/syntax.html#conceal 2. https://github.com/ehamberg/vim-cute-python https://github.com/ehamberg/vim-cute-python (moresymbols branch for er… more symbols) 3. https://github.com/akatov/pretty-mode https://github.com/akatov/pretty-mode
- ascotan 6y agoInteresting. I didn't know that!