Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Optional function argument? - Modular
M
Modular
•
2y ago
•
5 replies
Arvin_David
Optional function argument?
Hi everyone
I
'm wondering if it
's possible to have an optional argument for functions in Mojo
. So then if an argument were given
, it would have a value
(int for instance
) otherwise
, it would be None
.
Modular
Join
This server is the home of the MAX and Mojo community! Join us to chat about all things Modular.
20,199
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Optional string argument
M
Modular / questions
2y ago
Disambiguation of a call to an overloaded function when the argument satisfies multiple signatures?
M
Modular / questions
3y ago
Function Decorators
M
Modular / questions
3y ago
Async function docs?
M
Modular / questions
2y ago