Linux

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

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

Back to top button