From fbfaac2eaab5b3fd8e3a90cc44e3d7a6e395df40 Mon Sep 17 00:00:00 2001 From: Richard Wong Date: Mon, 8 Jul 2013 13:54:36 +0800 Subject: [PATCH] Reindent function * jieba/__init__.py (require_initialized): --- jieba/__init__.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/jieba/__init__.py b/jieba/__init__.py index 7b710b4..d206542 100644 --- a/jieba/__init__.py +++ b/jieba/__init__.py @@ -102,16 +102,18 @@ def initialize(*args): def require_initialized(fn): - global initialized,DICTIONARY - - @wraps(fn) - def wrapped(*args, **kwargs): - if initialized: - return fn(*args, **kwargs) - else: - initialize(DICTIONARY) - return fn(*args, **kwargs) - return wrapped + global initialized,DICTIONARY + + @wraps(fn) + def wrapped(*args, **kwargs): + if initialized: + return fn(*args, **kwargs) + else: + initialize(DICTIONARY) + return fn(*args, **kwargs) + + return wrapped + def __cut_all(sentence): dag = get_DAG(sentence)