Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
What is difference between `__init__(...) -> Self` vs `__init__(inout self, ...)`? - Modular
M
Modular
•
3y ago
czheo
What is difference between `__init__(...) -> Self` vs `__init__(inout self, ...)`?
I
'm familar with the later which is similar to what we typically write in Python
. But what is the former one
? It seems compile time with
@register_passable
@register_passable
structs always use that pattern
.
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 the difference between fn(inout v: T) and fn(ref v: T) ?
M
Modular / questions
16mo ago
What does the asterisk in this mojo code mean? fn __init__(inout self, *, capacity: Int):
M
Modular / questions
2y ago
Difference between Float32 and DType.float32
M
Modular / questions
3y ago
Difference between a pointer and dtypepointer in mojo.
M
Modular / questions
3y ago