Re: Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Mario Figueiredo
In article , __pete...@web.de says... > > self.data = dict(row) I didn't realize from the documentation it could be this simple. Thanks. > > And now an unsolicited remark: if you have more than one instance of Unknown > you might read the data outside the initialiser or at least keep the > c

Re: Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Peter Otten
Mario Figueiredo wrote: > Currently i'm using the following code to transform a row fetched from an > sqlite database into a dictionary property: class Unknown: > def __init__(self, id_): > self.id = id_ > self.data = None > ... > conn = sqlite3.connect('data'

Dictionary from sqlite3.Row and PyCharm unresolved reference

2015-02-13 Thread Mario Figueiredo
Currently i'm using the following code to transform a row fetched from an sqlite database into a dictionary property: def __init__(self, id_): self.id = id_ self.data = None ... conn = sqlite3.connect('data') conn.row_factory = sqlite3.Row row = conn.