# 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

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

1

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.

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2017-05-22 07:24:03 +0100 **

Seen: **312 times**

Last updated: **May 23 '17**

Plotting an integral with a variable as a limit

latex(-(x-1)/(x+1)) still broken

SAT Math Level 2 Subject Test Sample Question #19 [closed]

Can I build the sage documentation in parallel?

any way to turn off error msg when I catch the errors?

Why does graph plotting crop so aggressively, and what is a work-around?

How to magically define variables and use functional notation instead of methods

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

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 variable`l`

(small cap L), not`1`

. I have reported the issue on sage-dev.Thanks for reporting.