From: <go...@us...> - 2009-07-05 15:28:17
|
Author: goodger Date: 2009-07-05 17:28:09 +0200 (Sun, 05 Jul 2009) New Revision: 6009 Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py Log: make CSVTable.encode_for_csv/.decode_from_csv static methods, for API use Modified: trunk/docutils/docutils/parsers/rst/directives/tables.py =================================================================== --- trunk/docutils/docutils/parsers/rst/directives/tables.py 2009-07-04 12:04:09 UTC (rev 6008) +++ trunk/docutils/docutils/parsers/rst/directives/tables.py 2009-07-05 15:28:09 UTC (rev 6009) @@ -309,14 +309,18 @@ if sys.version_info < (3,): # 2.x csv module doesn't do Unicode - def decode_from_csv(self, s): + @staticmethod + def decode_from_csv(s): return s.decode('utf-8') - def encode_for_csv(self, s): + @staticmethod + def encode_for_csv(s): return s.encode('utf-8') else: - def decode_from_csv(self, s): + @staticmethod + def decode_from_csv(s): return s - def encode_for_csv(self, s): + @staticmethod + def encode_for_csv(s): return s def parse_csv_data_into_rows(self, csv_data, dialect, source): |