[Python-ideas] Towards harmony with JavaScript?

Chris Angelico rosuav at gmail.com
Fri Aug 11 20:18:51 EDT 2017


On Sat, Aug 12, 2017 at 10:15 AM, Carl Smith <carl.input at gmail.com> wrote:
> Using lambdas doesn't solve the problem. I just kept the example short, but
> had I used more than one expression in each function, you'd be back to
> square one. You took advantage of the brevity of the example, but it's not
> realistic.
>
> There are lots of language specific features that library authors use, like
> operator overloading, ABCs etc...
>
> Python is a great language, and I always opt for it when it's an option, but
> I've used it to write front-end code, and it sucks.

Code to its strengths. A few well-written function decorators will
solve your problems elegantly. If you start with JS code and then try
to port it, of course that won't look good - but if you start with
idiomatic Python, it looks great.

ChrisA


More information about the Python-ideas mailing list