Em Ter, 2006-03-28 às 15:18 -0800, Ross Ridge escreveu: [snip] > Consider this example using the socket.IPPROTO_RAW constant: > > >>> socket.getaddrinfo("localhost", None, socket.AF_INET, socket.SOCK_RAW, > >>> socket.IPPROTO_RAW)[0][2] is socket.IPPROTO_RAW > False > > >>> socket.getaddrinfo("localhost", None, socket.AF_INET, socket.SOCK_RAW, > >>> socket.IPPROTO_RAW)[0][2] == socket.IPPROTO_RAW > True
Ok, you win. It's not safe to do "is" checks on these kinds of constants. -- Felipe. -- http://mail.python.org/mailman/listinfo/python-list