[server] pythonic code