4 ms·
If you are using Python, you can call any function with keyword arguments e.g foo(bar, something=True, whatever=False, blubb=True) even if it is defined using p
by DasIch 15y ago
If you are using Python, you can call any function with keyword arguments e.g foo(bar, something=True, whatever=False, blubb=True) even if it is defined using positional arguments like foo(bar, something, whatever, blubb)
- radagaisus 15y agoYeah, I know, but in Ruby you can drop the parentheses. And in 1.9+ instead of `:something => 'value' you can write just `something: 'value'`. Python: `make('coffee', sugar=2, with='poison')`. Ruby: `make 'coffee', 2, with: ['poison']`. I prefer Ruby's style but it's still lacking.