4 ms·
I prefer array.single(), I think it's a rare enough use-case that spelling out what you are doing is worthwhile.
by DougBTX 16y ago
I prefer array.single(), I think it's a rare enough use-case that spelling out what you are doing is worthwhile.
- j_baker 16y agoAre you talking about another language? 1) In python, arrays and lists are two very different things. 2) Neither the array module nor the array class have a single function.
- DougBTX 16y agoThe example came to mind via C#. I assumed that it could be added to Python via a mixin or whatever if you wanted to do it there.