...

Avoid Using Flags as a Function’s Parameters

Avoid Using Flags as a Function’s Parameters

A function should only do one thing. If flags are used as a function’s parameters, the function is doing more than one thing.

When you find yourself using flags as a way to run different code, consider splitting your function into different functions.

My previous tips on good Python practices.

Search

Related Posts

2 thoughts on “Avoid Using Flags as a Function’s Parameters”

Comments are closed.

Related Posts

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.