X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=pycomedi%2Fsubdevice.pyx;h=14338a8c2f3886b30428f1895cf510faad937f36;hb=HEAD;hp=582835ed91bde4fcd30e2d99b3f60cbfae404545;hpb=0d40627995f40367a47ea6772ee9dc98ceb135d7;p=pycomedi.git diff --git a/pycomedi/subdevice.pyx b/pycomedi/subdevice.pyx index 582835e..14338a8 100644 --- a/pycomedi/subdevice.pyx +++ b/pycomedi/subdevice.pyx @@ -150,12 +150,8 @@ cdef class Subdevice (_SubdeviceHolder): def channels(self, **kwargs): "Iterate through all available channels." - ret = [] for i in range(self.get_n_channels()): - #yield self.channel(i, **kwargs) - # Generators are not supported in Cython 0.14.1 - ret.append(self.channel(i, **kwargs)) - return ret + yield self.channel(i, **kwargs) def channel(self, index, factory=_channel.Channel, **kwargs): "`Channel` instance for the `index`\ed channel."