Opened 14 years ago

Closed 14 years ago

#2314 closed defect (fixed)

Python function block returns string to add block

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


print (1+python block(log10(100)))
gives 12.0
should give 3.0

Attachments (1)

2314.png (89.1 KB) - added by walter 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by walter

comment:1 Changed 14 years ago by walter

I cannot reproduce this error. See attached image.

comment:2 Changed 14 years ago by tonyforster

1+log10(100) = 12
1+math.log10(100) =3
thats a surprise!

comment:3 Changed 14 years ago by walter

For some reason unknown to me, importing numpy is the source of this problem. I am removing the import and all is well.

Oddly, I don't know why math.log10 ever worked, since I import from math, but don't import math. Now that I removed the numpy import, you cannot use the form math.log10 any more, which is probably the behavior we want any way.

Will push the patch in v99.

comment:4 Changed 14 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.