##// END OF EJS Templates
Miscellaneous Py 3 fixes
Thomas Kluyver -
Show More
@@ -721,7 +721,6 b' _type_pprinters = {'
721 type: _type_pprint,
721 type: _type_pprint,
722 types.FunctionType: _function_pprint,
722 types.FunctionType: _function_pprint,
723 types.BuiltinFunctionType: _function_pprint,
723 types.BuiltinFunctionType: _function_pprint,
724 types.SliceType: _repr_pprint,
725 types.MethodType: _repr_pprint,
724 types.MethodType: _repr_pprint,
726
725
727 datetime.datetime: _repr_pprint,
726 datetime.datetime: _repr_pprint,
@@ -732,15 +731,17 b' _type_pprinters = {'
732 try:
731 try:
733 _type_pprinters[types.DictProxyType] = _dict_pprinter_factory('<dictproxy {', '}>')
732 _type_pprinters[types.DictProxyType] = _dict_pprinter_factory('<dictproxy {', '}>')
734 _type_pprinters[types.ClassType] = _type_pprint
733 _type_pprinters[types.ClassType] = _type_pprint
735 _type_pprinters[long] = _repr_pprint
734 _type_pprinters[types.SliceType] = _repr_pprint
736 _type_pprinters[unicode] = _repr_pprint
735 except AttributeError: # Python 3
737 except (AttributeError, NameError): # Python 3
736 _type_pprinters[slice] = _repr_pprint
738 _type_pprinters[bytes] = _repr_pprint
739
737
740 try:
738 try:
741 _type_pprinters[xrange] = _repr_pprint
739 _type_pprinters[xrange] = _repr_pprint
740 _type_pprinters[long] = _repr_pprint
741 _type_pprinters[unicode] = _repr_pprint
742 except NameError:
742 except NameError:
743 _type_pprinters[range] = _repr_pprint
743 _type_pprinters[range] = _repr_pprint
744 _type_pprinters[bytes] = _repr_pprint
744
745
745 #: printers for types specified by name
746 #: printers for types specified by name
746 _deferred_type_pprinters = {
747 _deferred_type_pprinters = {
@@ -166,7 +166,7 b' class ColorSchemeTable(dict):'
166 Names are by default compared in a case-insensitive way, but this can
166 Names are by default compared in a case-insensitive way, but this can
167 be changed by setting the parameter case_sensitive to true."""
167 be changed by setting the parameter case_sensitive to true."""
168
168
169 scheme_names = self.keys()
169 scheme_names = list(self.keys())
170 if case_sensitive:
170 if case_sensitive:
171 valid_schemes = scheme_names
171 valid_schemes = scheme_names
172 scheme_test = scheme
172 scheme_test = scheme
General Comments 0
You need to be logged in to leave comments. Login now