Implicit lists

Bengt Richter bokr at oz.net
Fri Jan 31 03:51:59 CET 2003


On 31 Jan 2003 01:51:13 GMT, bokr at oz.net (Bengt Richter) wrote:
[...]
>====< stringlist.py >===============================
[...]
>    def __setitem__(self, i, v): self.sl[i] = stringlist(v)[0]
[...]
>There might be bugs or better ways to implement the above, but I hope it
Predictably enough ;-/

[18:51] C:\pywk\clp>diff stringlist.py~ stringlist.py
16c16
<     def __setitem__(self, i, v): self.sl[i] = stringlist(v)[0]
---
>     def __setitem__(self, i, v): self.sl[i] = self.__class__(v)[0]

I Should have left it out or tested. Fortunately it was misspelled, so
it showed up (don't like the global name route). There may be more ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list