Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
What does the asterisk in this mojo code mean? fn __init__(inout self, *, capacity: Int): - Modular
M
Modular
•
2y ago
•
2 replies
hat
What does the asterisk in this mojo code mean? fn __init__(inout self, *, capacity: Int):
I
'm curious about the source code for List
(
https://github.com/modularml/mojo/blob/main/stdlib/src/collections/list.mojo#L105C5-L105C47
)
, which has this line
fn __init__(inout self, *, capacity: Int):
...
fn __init__(inout self, *, capacity: Int):
...
What does the asterisk
*
*
mean in the function
's parameters
?
GitHub
mojo/stdlib/src/collections/list.mojo at main · modularml/mojo
The Mojo Programming Language
. Contribute to modularml
/mojo development by creating an account on GitHub
.
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
What is difference between `__init__(...) -> Self` vs `__init__(inout self, ...)`?
M
Modular / questions
3y ago
What is the difference between fn(inout v: T) and fn(ref v: T) ?
M
Modular / questions
16mo ago
Does this error mean that this python library can not be used in Mojo?
M
Modular / questions
3y ago
Py def vs Mojo fn
M
Modular / questions
3y ago