This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年06月16日 09:09 by krastanov-stefan, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg162962 - (view) | Author: Stefan Krastanov (krastanov-stefan) | Date: 2012年06月16日 09:09 | |
>>> set.union(set([1,2]), [3]) set([1, 2, 3]) >>> set.union([1,2], [3]) TypeError: descriptor 'union' requires a 'set' object but received a 'list' It seems a bit inconsistent. Is it justified somehow? |
|||
| msg162973 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年06月16日 14:02 | |
By calling 'set.union' you are calling the method on the class. When you call a method directly on a class object, you have to explicitly pass in 'self'. Thus the first argument when you call it like that must be a set object. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:31 | admin | set | github: 59290 |
| 2012年06月16日 14:02:45 | r.david.murray | set | status: open -> closed nosy: + r.david.murray messages: + msg162973 resolution: not a bug stage: resolved |
| 2012年06月16日 09:09:08 | krastanov-stefan | create | |