Ticket #831 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

obiGEO.GDSInfo() iteratins through keys

Reported by: blaz Owned by: ales
Milestone: 2.6 Component: orng_modules
Severity: minor Keywords:
Cc: Blocking:
Blocked By:


The following code works fine:

info = obiGEO.GDSInfo()
for k in info.keys():
   print k

The code should be equivalent to (right?):

info = obiGEO.GDSInfo()
for k in info:
   print k

But this later code gives the error:

/Users/blaz/Documents/Workspace/Bioinformatics/obiGEO.py in __getitem__(self, key)
     51     def values(self): return self.info.values()
     52     def clear(self): return self.info.clear()
---> 53     def __getitem__(self, key): return self.info[key]
     54     def __setitem__(self, key, item): self.info[key] = item
     55     def __len__(self): return len(self.info)

KeyError: 0

Change History

comment:1 Changed 3 years ago by ales

  • Status changed from new to closed
  • Resolution set to fixed

In [11050]:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.