Ok it is a 3 way flag, but the code is not awkward. 'c' is just a name I chose - it does not mean anything.
The check for a valid number can be used on a list of strings - [float(s) for s in lst if s.isfloat() is not None] No 3 way flag here. Difficult to do with EAFP. _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/4DP34QO3VPL65JWM7BCFAJ5ECHEZX4ZI/ Code of Conduct: http://python.org/psf/codeofconduct/
