@anze3db @gvwilson i know this isn't the point of this at all, but that python code isn't even good. That multiplication produces a float, so the function should return a float and not an int.
(Editing to clarify: python has dynamic typing, but you can specify types. It's specifying the wrong type which is funny to me)
@Henodudude @anze3db @gvwilson and to be fully precise, money is decimals and not int or float
@Henodudude @anze3db @gvwilson None of these examples are any good. All of them use an undocumented citationless literal as a multiplier - a Magic Number.
If you're writing code like this, isolate the literals in a module or library, document what they mean, units of measure (if applicable), and cite the source of the data.
# From 2024-11-27 email from Chad in HR (see refs/salary_info.txt
# TODO !ticket_number: Justify why this is not 1.0
female_salary_modifier: float = 0.77
I refactor a lot of legacy engineering code and do V&V on safety-related codes so flagging and fixing Magic Numbers is reflexive. Unsurprising that LLM-fabricated code is both sexist and bad.