
On Fri, Jan 31, 2003 at 06:30:06PM +1100, Andrew Bennetts wrote:
On Fri, Jan 31, 2003 at 12:54:57AM -0600, Glyph Lefkowitz wrote:
On Fri, 31 Jan 2003 17:23:24 +1100, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
+ if isinstance(port, types.StringTypes): ^^^^^^^^^^^^^^^^^ This breaks Python 2.1
Should tcp.py import t.p.compat (ugh)?
I think not. This has been the recommended style for a while.
Python 2.1.3 (#1, Jan 3 2003, 13:08:57) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import types >>> isinstance(1, types.StringType) 0 >>> isinstance(1, types.IntType) 1
Yes, but now try types.StringType*s*, as used in the code.
Yea, thanks. Fix has been checked in. (Not only is StringTypes not in 2.1, but isinstance() doesn't work on tuples there either ;) Jp -- C/C++/Java/Perl/Python/Smalltalk/PHP/ASP/XML/Linux (User+Admin) Genetic Algorithms/Genetic Programming/Neural Networks Networking/Multithreading/Legacy Code Maintenance/OpenGL See my complete resume at http://intarweb.us:8080/ -- up 46 days, 7:49, 5 users, load average: 0.55, 0.34, 0.16