4 ms·
Hi Everyone, First of all, thank you all for your comments. I have to clarify the purpose of this library. I'm originally a JavaScript developer and I didn't w
by serkanyersen 14y ago
Hi Everyone,
First of all, thank you all for your comments. I have to clarify the purpose of this library. I'm originally a JavaScript developer and I didn't write a single line of python code before this project.
I needed a project to learn python and I choose something I'm already familiar with. Underscore.js has almost everything you want to learn on a new language and it thought me a lot.
When I completed the project I figured I can post it online and other clueless javascript developers like myself can learn python from a familiar place.
I'm fully aware that python already has most of the tools underscore has and this code is not pythonic at all. It was built that way intentionally. I wanted it to be the same as underscore.js.
Now I need your advice to write a better python code and maybe create a useful library after all.
Thank you all.
PS: I wrote this comment from mobile phone so please excuse any errors.
- tebeka 14y agoAlso note that _ has a meaning in the Python REPL - it's the value of the last expression.
- serkanyersen 14y agoYes, I'm aware of this problem, underscore.php solved this using double underscores maybe I can add a noConflict method to rename the library and free up underscore variable.
- malandrew 14y ago_ is also used in the node.js REPL to mean the last expression. This means that you can't require() underscore.js as you normally would and must instead choose a different name.
- anonymouz 14y agoMy personal feeling is, that you would learn more about Python by trying to write something using the standard library and embracing Python's style, instead of porting a JavaScript library.