3 ms·
I would guess complex objects - containers, or strange databasey stuff. The way to deal with is __complex__ as a method on the object and recurse through askin
by lifeisstillgood 14y ago
I would guess complex objects - containers, or strange databasey stuff.
The way to deal with is __complex__ as a method on the object and recurse through asking the complex method to return nested simpler python types.
- danellis 14y ago__complex__ is for converting to a complex number.
- davesque 14y agoyeah, danellis is right. don't use __complex__ for that. it's for complex numbers: http://docs.python.org/2/library/functions.html#complex http://docs.python.org/2/library/functions.html#complex --and-- http://docs.python.org/2/library/cmath.html http://docs.python.org/2/library/cmath.html