How I patched Python to include this great Ruby feature
Ruby, unlike Python, makes lots of things implicit, and there's a special kind of if expression that demonstrates this well. It's often referred to as an "inline-if" or "conditional modifier", and this special syntax is able to return one value when a condition is true, but another value (nil, specifically) when a condition is false. Here's an example:
read more
|
|
Full Story |
This topic does not have any threads posted yet!
You cannot post until you login.