projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop support for Python 2.x
[mudpy.git]
/
lib
/
mudpy
/
misc.py
diff --git
a/lib/mudpy/misc.py
b/lib/mudpy/misc.py
index
2edf966
..
059e1be
100644
(file)
--- a/
lib/mudpy/misc.py
+++ b/
lib/mudpy/misc.py
@@
-1,7
+1,7
@@
# -*- coding: utf-8 -*-
"""Miscellaneous functions for the mudpy engine."""
# -*- coding: utf-8 -*-
"""Miscellaneous functions for the mudpy engine."""
-# Copyright (c) 2004-201
3
Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-201
4
Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
@@
-204,9
+204,6
@@
class Element:
def set(self, facet, value):
"""Set values."""
if not self.has_facet(facet) or not self.get(facet) == value:
def set(self, facet, value):
"""Set values."""
if not self.has_facet(facet) or not self.get(facet) == value:
- # TODO: remove this check after the switch to py3k
- if repr(type(value)) == "<type 'unicode'>":
- value = str(value)
if not type(value) is str:
value = repr(value)
self.origin.data.set(self.key, facet, value)
if not type(value) is str:
value = repr(value)
self.origin.data.set(self.key, facet, value)
@@
-1198,11
+1195,7
@@
def wrap_ansi_text(text, width):
escape = False
# normalize any potentially composited unicode before we count it
escape = False
# normalize any potentially composited unicode before we count it
- # TODO: remove this check after the switch to py3k
- try:
- text = unicodedata.normalize("NFKC", text)
- except TypeError:
- text = unicodedata.normalize("NFKC", unicode(text))
+ text = unicodedata.normalize("NFKC", text)
# iterate over each character from the begining of the text
for each_character in text:
# iterate over each character from the begining of the text
for each_character in text: