Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5277
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: list equal to subclass of list? |
| Date | 2011-05-12 21:53 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-9BFE09.21530512052011@news.panix.com> (permalink) |
| References | <roy-B4A109.08230412052011@news.panix.com> <mailman.1479.1305217887.9059.python-list@python.org> |
In article <mailman.1479.1305217887.9059.python-list@python.org>, Ethan Furman <ethan@stoneleaf.us> wrote: > > [http://docs.python.org/library/stdtypes.html] > > Objects of different types, except different numeric types and different > > string types, never compare equal > > This part of the documentation is talking about built-in types, which > your MyList is not. > > > > [http://docs.python.org/release/2.7/reference/expressions.html#notin] > > objects of different types *always* compare unequal > > Should probably have the word 'built-in' precede 'types' here, since > constructed objects can do whatever they have been told to do. Changing the docs (in numerous places) to make it clear that this is only true of built-in types would indeed resolve the problem. As it reads now, it's a general statement about ALL types, built-in or user-defined.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
list equal to subclass of list? Roy Smith <roy@panix.com> - 2011-05-12 08:23 -0400
Re: list equal to subclass of list? Ethan Furman <ethan@stoneleaf.us> - 2011-05-12 09:43 -0700
Re: list equal to subclass of list? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-13 00:18 +0000
Re: list equal to subclass of list? Ethan Furman <ethan@stoneleaf.us> - 2011-05-12 18:04 -0700
Re: list equal to subclass of list? Roy Smith <roy@panix.com> - 2011-05-12 21:53 -0400
Re: list equal to subclass of list? Ethan Furman <ethan@stoneleaf.us> - 2011-05-12 11:29 -0700
Re: list equal to subclass of list? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-12 22:40 +0200
Re: list equal to subclass of list? Roy Smith <roy@panix.com> - 2011-05-12 13:49 -0700
Re: list equal to subclass of list? Ethan Furman <ethan@stoneleaf.us> - 2011-05-12 14:48 -0700
csiph-web