18F / pulse

How the federal .gov domain space is doing at best practices and policies.
Other
94 stars 56 forks source link

replace if in check with setdefault #795

Closed buckley-w-david closed 6 years ago

buckley-w-david commented 6 years ago

This PR replaces the conditional creation of a subdomains key with usage of the setdefault method.

This will get the key if it exists, and if not it will set the key with a default value and return it.