[Python-Dev] PySet API (original) (raw)
Raymond Hettinger python at rcn.com
Wed Mar 22 04:01:39 CET 2006
- Previous message: [Python-Dev] PySet API
- Next message: [Python-Dev] PySet API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Me]
There is a semantic difference between code like s+=t and s.update(t). The former only works when t is a set and the latter works for any iterable. When the C code corresponds to the Python code, that knowledge is kept intact and there is no confusion between PyNumberInPlaceAdd(s,t) vs PyObjectCallMethod(s, "update", "(O)", t).
Of course, that should have been s|=t and PyNumber_InPlaceOr().
Raymond
- Previous message: [Python-Dev] PySet API
- Next message: [Python-Dev] PySet API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]