I’ve been using Sublime Text 2 for a little while now.
It was fantastic and did exactly what I wanted to do.
However, recently, I wrote a function and it wouldn’t work.
So I thought something must be wrong and started using all sorts of codes and they won’t return.
In example, the usual occurrence.
[code]def greatest(a):
big =0
for i in a:
if i > big:
big = i
return big
greatest([1,2,3])
def something():
return “something”
something()[/code]
However, if I use “print” in my functions they respond alright. But I need “return” anyways.
I get:
[Finished]
[code]def greatest(a):
big =0
for i in a:
if i > big:
big = i
print big
greatest([1,2,3])
def something():
print “something”
something()[/code]
I get:
3
something
[Finished]
Basically “return” isn’t working.
The return function works when I run them through the terminal.
As shown below:
[code]>>> def greatest(a):
… big =0
… for i in a:
… if i > big:
… big = i
… return big
…
greatest([1,2,3])
3
[/code]
Don’t have much of a lead in that sense.
Funnily, I just tried this on an online Python interpreter and that one acts just like Sublime Text 2 does as well (“return” doesn’t return), I ran it on Google Chrome.
I haven’t attempted reinstalling anything yet. I don’t see the point of going through all that hassle. Don’t recall much that could’ve caused it although as I typing Google Chrome is looking like the culprit.
I am operating on latest release of Slackware 13.37 32-bit.
Any ideas? Anyone been through it?