>>>>> "Barry" == Barry Warsaw <[EMAIL PROTECTED]> writes:
Barry> On Mon, 2005-06-06 at 14:38, Skip Montanaro wrote: >> import urllib >> from www.urllib import urlopen >> >> the module-level code should only be executed once, and >> >> urlopen == urllib.urlopen >> >> should evaluate to True. Barry> Not to mention "urlopen is urllib.urlopen" Whoops, yeah. I was thinking in terms of module-level functions and classes, where I think == is sufficient: >>> import foo2 >>> foo2.f <function f at 0x38e6b0> >>> g = foo2.f >>> reload(foo2) <module 'foo2' from 'foo2.pyc'> >>> foo2.f == g False Obviously, for data objects "is" is what you want. Skip _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com