polaris-/dwc_network_server_emulator — pull request #27 by msoucy (2014-05-27 07:12:52+00:00)
Title: Just use a for loop instead of creating tons of wrapper functions

There's really no need to create wrappers like that, especially when even the wrappers could have been made simpler by introducing a simple function:

```python
def start_server(server):
def _start_server_():
srv = server()
srv.start()
return _start_server_

start_backend_server = start_server(GameSpyBackendServer)
# ...
```

From there, we know that we can just combine the assignment and the call to .start():

```python
def start_server(server):
def _start_server_():
server().start()
return _start_server_
```

This is a good use case for a lambda function:

```python
def start_server(server):
return lambda:server().start()
```

which can be simplified as in my second commit:

```python
def start_server(server):
return server().start
```