Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>as it's implemented like a method rather than a function

Why should it be a function? It can be a method on sequence like objects (trait)...

Python itself has tons of those...



Because the parameters to zip aren't positional, they are just multiple parameters of the same type.

Python does have some that annoy me a bit. I think str.join would be clearer as a function, but at least that does have a positional parameter.


>Because the parameters to zip aren't positional, they are just multiple parameters of the same type.

How is that a counter-argument? It makes sense then that the method belongs to that type (iteratables).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: