News for hackers. Stuff that matters.
Re:Get rid of boolean function parameters by riquito on Monday June 15, 2015 @06:13AM (#9718450)
Named parameters are nice in this case, e.g. in Python

    def calc_formula(a, b, is_gain=False):
        ...
    
    calc(a, b, is_gain=True)
Re:Get rid of boolean function parameters by moreati on Monday June 15, 2015 @06:35AM (#9718519)
Also worth mentioning that Python 3 supports keyword only parameters, which enforce this calling styling http://blog.gahooa.com/2009/12/08/python-has-keyword-only-pa... e.g.

    def calc_formula(a, b, *, is_gain=False):
        ...