[Python-ideas] PEP 485: A Function for testing approximate equality

Ethan Furman ethan at stoneleaf.us
Thu Feb 5 22:33:36 CET 2015


On 02/05/2015 01:03 PM, Chris Barker wrote:
> On Thu, Feb 5, 2015 at 12:14 PM, Marco Buttu <marco.buttu at gmail.com <mailto:marco.buttu at gmail.com>> wrote:
> 
>     On 05/02/2015 18:56, Guido van Rossum wrote:
> 
>         - Which module should this go into? (I think math, but I don't think you state it.)
> 
> 
>     In that case it should be isclose(), for consistency with the other math.is <http://math.is>* functions. But
>     wherever we put it, I would suggest to change to isclose() because in the standard library we usually have
>     issomething() instead of is_something().
> 
> 
> I was going with PEP8: "Function names should be lowercase, with words separated by underscores as necessary to improve
> readability." But consistency with other functions in the lib (or specifically in the same module) is probably better, yes.

PEP8 on consistency [1] (second paragraph):

   A style guide is about consistency. Consistency with this style guide is
   important. Consistency within a project is more important. Consistency
   within one module or function is most important.

[1]  https://www.python.org/dev/peps/pep-0008/#id10

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150205/98848500/attachment.sig>


More information about the Python-ideas mailing list