Atihska
Atihska

Reputation: 5126

Getting argument error while converting set to list

I have a set that I am trying to convert to a list, but I get Error in argument: u'(different_aois)'

ipdb> l = list(different_aois)
*** Error in argument: u'= list(different_aois)'
ipdb> type(different_aois)
<type 'set'>
ipdb> list(different_aois)
*** Error in argument: u'(different_aois)'

Upvotes: 5

Views: 3474

Answers (1)

blue note
blue note

Reputation: 29071

In pure python this should work. It ipdb, list is a command that overrides the normal python list. See https://github.com/gotcha/ipdb/issues/106, which mentions that you should write it as

!l = list(different_aois)

Upvotes: 18

Related Questions