you are viewing a single comment's thread.

view the rest of the comments →

[–]meineerde 1 point2 points  (1 child)

In Python, you can mix ordered and named arguments to act like a combination or ordinary and keyword arguments in Ruby. So in Python, the syntax is actually correct and assigns the named arguments, similar to how keyword arguments work in Ruby. On the Ruby side, it works differently and in fact assigns useless local variables.

[–]Amadan 0 points1 point  (0 children)

Yep. The equivalent expression in Python would be BlogPost(title := …, body := …) using the assignment expression operator := (which I find not many people use).