I see two ways of setting up define in tornado.
import tornado.options
def define_web(hidden=False):
define = partial(tornado.options.define, group='Web', hidden=hidden)
define('thread', False, type=bool,
help='threading')
and without using partial
from tornado.options import options, define
def define_web(hidden=False):
define('thread', False, type=bool,
help='threading')
So I was wondering what is the difference, and what is advantage of using partials
Aucun commentaire:
Enregistrer un commentaire