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 TebabkhaOP15mo ago
How I can convert from object python for example int to Int in MOJO
Stole
Stole15mo 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 TebabkhaOP15mo 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 Clayton14mo ago
@Elaid Tebabkha try updating to 0.3.1 and autocomplete should work now
Elaid Tebabkha
Elaid TebabkhaOP14mo ago
Thanks 🙏
ModularBot
ModularBot14mo ago
Congrats @Elaid Tebabkha, you just advanced to level 1!
Elaid Tebabkha
Elaid TebabkhaOP14mo ago
Not working.
Stole
Stole14mo ago
What's the specific issue?
Want results from more Discord servers?
Add your server