From 36a3db5e295ded16a880540c5cd4947860931ac3 Mon Sep 17 00:00:00 2001 From: red-agent Date: Sat, 26 Sep 2009 13:44:08 +0300 Subject: [PATCH] Tiny code style corrections --- src/common/i18n.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/common/i18n.py b/src/common/i18n.py index 94c8fc2ef..d8f153f2f 100644 --- a/src/common/i18n.py +++ b/src/common/i18n.py @@ -29,14 +29,18 @@ import defs import unicodedata def paragraph_direction_mark(text): - """Determine paragraph writing direction according to + """ + Determine paragraph writing direction according to http://www.unicode.org/reports/tr9/#The_Paragraph_Level - Returns either Unicode LTR mark or RTL mark.""" - for c in text: - bidi = unicodedata.bidirectional(c) - if bidi == 'L': return u'\u200E' - elif bidi == 'AL' or bidi == 'R': return u'\u200F' + Returns either Unicode LTR mark or RTL mark. + """ + for char in text: + bidi = unicodedata.bidirectional(char) + if bidi == 'L': + return u'\u200E' + elif bidi == 'AL' or bidi == 'R': + return u'\u200F' return u'\u200E'