Saturday 2 August 2014

Changes in string function in python

error: <class 'AttributeError'>: 'module' object has no attribute 'strip'
Line of Error: _extraArguments = string.split(_extraArguments)

This is one of the errors i got while building sugar.
As it turns out Python3 does not support string functions from the string module anymore and Python2 discourages it too. All the functions are now methods for the string object.
So the correct way to solve the above error would be to use the split method instead of the string.split function.
Correct Code:  _extraArguments = _extraArguments.split()

These string functions are used throughout sugar in various modules so i changed these functions everywhere in most of the sugar modules to their respective methods.

1 comment:

  1. The Casino of Las Vegas - DrmCD
    Las Vegas is no ordinary city. But there are 과천 출장마사지 a 남원 출장샵 number of reasons. As for the sheer size 당진 출장샵 of this 나주 출장마사지 Las Vegas 밀양 출장안마 casino, the city's

    ReplyDelete

Math of Intelligence : Logistic Regression

Logistic Regression Logistic Regression ¶ Some javascript to enable auto numberi...