object.contains where x.contains(y)
+ is equivalent to Python code y in x.
+ Now dict.has_key is just a wrapper of object.contains.
+ str.decode will be removed.list.sort, which is:
+ void sort(object_cref cmpfunc);+ will change to: +
void sort(args_proxy const &args, kwds_proxy const &kwds);+ + This is because in Python 3
list.sort requires all its arguments be keyword arguments.
+ So you should call it like this:
+ x.sort(*tuple(), **dict(make_tuple(make_tuple("reverse", true))));
+
+ +# define Py_TYPE(o) (((PyObject*)(o))->ob_type) +# define Py_REFCNT(o) (((PyObject*)(o))->ob_refcnt) +# define Py_SIZE(o) (((PyVarObject*)(o))->ob_size)+ So extension writers can use these macro directly, to make code clean and compatible with Python 3. +