"help( pi )"
Chris Angelico
rosuav at gmail.com
Fri Nov 17 16:57:27 EST 2017
On Sat, Nov 18, 2017 at 8:27 AM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> It *could* be made to work:
>
> import math
>
> class PI(float):
>
> __doc__ = "The circle constant (Note: tau is better :-)"
>
> math.pi = PI(math.pi)
>
> print(math.pi)
> help(math.pi)
How is THAT an improvement? Docstrings aren't supposed to give false
information!
*diving for cover*
ChrisA
More information about the Python-list
mailing list