This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Math library Bug Return None for "degrees(0)"
Type: behavior Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Ion SKALAMERA, hamidnazari, mark.dickinson, rhettinger, stutzbach, xtreak
Priority: normal Keywords:

Created on 2020-03-16 04:42 by Ion SKALAMERA, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg364285 - (view) Author: Ion SKALAMERA (Ion SKALAMERA) Date: 2020-03-16 04:42
I tried programming a recursive fractal with Python Turtle on repl.it:
https://repl.it/@IonSKALAMERA/simplefractalrecursive
and when my code came to calculating the angle degrees(0) returned NoneType which is a serious bug in the math library. I dont know with which Python version it operates
msg364289 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-03-16 06:12
math.degrees returns 0.0 and even has a test for this at https://github.com/python/cpython/blob/5b66ec166b81c8a77286da2c0d17be3579c3069a/Lib/test/test_math.py#L476 . I am not sure of the environment under which repl.it runs as sys is not accessible. I guess it's an issue on their side.

./python.exe
Python 3.9.0a4+ (heads/master:5b66ec166b, Mar 16 2020, 10:41:43)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.degrees(0)
0.0
msg364291 - (view) Author: Hamid Nazari (hamidnazari) Date: 2020-03-16 06:38
You seem to be calling `turtle.degrees()`, not `math.degrees()`.

Try this in your Repl.it: (which does not use cpython, rather it uses Skulpt)

import math
import turtle
print(turtle.degrees(0))
print(math.degrees(0))
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84153
2020-03-16 07:03:32SilentGhostsetstatus: open -> closed
nosy: + Ion SKALAMERA

resolution: not a bug
stage: resolved
2020-03-16 06:38:26hamidnazarisetnosy: + hamidnazari
messages: + msg364291
2020-03-16 06:12:42xtreaksetnosy: + xtreak
messages: + msg364289
2020-03-16 05:37:14Ion SKALAMERAsetcomponents: + Library (Lib)
2020-03-16 05:21:31Ion SKALAMERAsetnosy: + rhettinger, mark.dickinson, stutzbach, - Ion SKALAMERA
2020-03-16 04:42:58Ion SKALAMERAcreate