Hi,

Jason, unset variables from type str can change from None to the
string None. See attached example:

import kaa.db

db = kaa.db.Database('none.db')
db.register_object_type_attrs(
    "dir", [],
    name = (str, kaa.db.ATTR_KEYWORDS),
    str1 = (str, kaa.db.ATTR_SIMPLE),
    str2 = (str, kaa.db.ATTR_SIMPLE)
)
db.add_object('dir', name='x')
db.commit()

# print unset value str2
obj = db.query(name='x')[0]
val = obj.get('str2')
print val, type(val)

# set str1
db.update_object(('dir', obj.get('id')), str1='x')

# print unset value str2
obj = db.query(name='x')[0]
val = obj.get('str2')
print val, type(val)


Result:

None <type 'NoneType'>
None <type 'str'>

-- 
Voodoo is a very interesting religion for the whole family, even those
members of it who are dead.
        -- (Terry Pratchett & Neil Gaiman, Good Omens)

Attachment: pgpc2Cgjxg4kR.pgp
Description: PGP signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to