Mojo does not allow dynamic value in default argument #801
Replies: 2 comments
-
This limitation is described in the rough edges section of the documentation (first bullet point in the small independent features). It is in Modular's plans to make Mojo eventually compatible with python. But mojo is very young, so I think it will take quite some time to get there. I hope Modular will open source it once they have a good solid foundation to build on, and the community can help mojo become a superset of python faster. |
Beta Was this translation helpful? Give feedback.
-
Closing this just because it is tracked in rough edges already, we definitely need to support this in time |
Beta Was this translation helpful? Give feedback.
-
The following code works in python, but not in mojo:
I get:
Is this "incompatibility" going to stay? IIRC, it is somewhat common idiom in Python to overcome lazy evaluation...
Beta Was this translation helpful? Give feedback.
All reactions