Why is Sage calling 1 a variable?
Consider
x = var('x')
f = 1/(x-3)
limit(f,x=3,dir='below')
UnboundLocalError: local variable 'l' referenced before assignment
Consider
x = var('x')
f = 1/(x-3)
limit(f,x=3,dir='below')
UnboundLocalError: local variable 'l' referenced before assignment
Try with limit(f, x=3, dir='minus')
.
I think this is a (trivial) bug, thanks for reporting. The code in question is in lines 1228-1245 of calculus.py
.
Edit: this is #23048.
Thanks for fixing.
Asked: 7 years ago
Seen: 351 times
Last updated: May 23 '17
I'm using preformat so I have no idea why the first two statements keep showing up on the same line, but they aren't
The error message is
local variable 'l' referenced before assignment
. It's variablel
(small cap L), not1
. I have reported the issue on sage-dev.Thanks for reporting.