Mojo Auto-completion in vs-code

MOJO Auto-completion and suggestions not working in vs-code. Os: Kali Linux under WSL
8 Replies
Elaid Tebabkha
Elaid Tebabkha12mo ago
How I can convert from object python for example int to Int in MOJO
Stole
Stole12mo ago
You can use to_float64() (https://docs.modular.com/mojo/stdlib/python/object.html#pythonobject) and then to_int() to convert that SIMD value to an Int. Example:
let ob = Python.evaluate("5")
let i: Int = ob.to_float64().to_int()
let ob = Python.evaluate("5")
let i: Int = ob.to_float64().to_int()
PythonObject also has to_string(), which functions as you'd expect.
Elaid Tebabkha
Elaid Tebabkha12mo ago
thanks a lot The value is expected from input in python and want to use in Mojo. Is there equivalent of input in mojo?
Jack Clayton
Jack Clayton12mo ago
@Elaid Tebabkha try updating to 0.3.1 and autocomplete should work now
Elaid Tebabkha
Elaid Tebabkha12mo ago
Thanks 🙏
ModularBot
ModularBot12mo ago
Congrats @Elaid Tebabkha, you just advanced to level 1!
Elaid Tebabkha
Elaid Tebabkha12mo ago
Not working.
Stole
Stole12mo ago
What's the specific issue?
Want results from more Discord servers?
Add your server