Review uses of string module in Python #1222

gedeck opened this Issue Dec 20, 2016 · 0 comments


None yet

1 participant

gedeck commented Dec 20, 2016

There is still Python code that uses string module functions that are removed in Python 3. Example:

.../rdkit/sping/ in drawMultiLineString(self, s, x, y, font, color, angle, **kwargs)
    393                 dy = h * math.cos(angle*math.pi/180.0)
    394                 dx = h * math.sin(angle*math.pi/180.0)
--> 395                 s = string.replace(s, '\r\n', '\n')
    396                 s = string.replace(s, '\n\r', '\n')
    397                 s = string.replace(s, '\r', '\n')

AttributeError: module 'string' has no attribute 'replace'

Review all uses of the string module and replace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment