M
Modular15mo ago
Igor

kwargs

I'm trying to use a Python function that needs kwargs how do you deal with them?
3 Replies
Stole
Stole15mo ago
Modular Docs - Mojo🔥 roadmap & sharp edges
A summary of our Mojo plans, including upcoming features and things we need to fix.
Igor
IgorOP15mo ago
@Stole I figure out you can do this:
def create_server(
host: str,
port: int,
reuse_port: bool,
) -> socket.socket:
return socket.create_server((host, port), reuse_port=reuse_port)
def create_server(
host: str,
port: int,
reuse_port: bool,
) -> socket.socket:
return socket.create_server((host, port), reuse_port=reuse_port)
so you can call that function and send kwargs to the other function... and it "works"
Stole
Stole15mo ago
Ah yeah I guess you could do it in Python. Not the most optimal workaround but oh well that's probably all we have right now
Want results from more Discord servers?
Add your server