This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.2a1 List functionality
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: cjwhrh, gvanrossum
Priority: normal Keywords:

Created on 2001-07-31 12:51 by cjwhrh, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg5717 - (view) Author: Colin J. Williams (cjwhrh) Date: 2001-07-31 12:51
a= [1,2,3]
b= list([1,2,3])
a == b                                gives a result of 1  - Good
type(a) == type(b)               gives a result of 1  - Not good

a and b have different methods.

Perhaps the list class should be 'List' to (a) distinguish between the two types
and (b) to follow the convention that class names start with an upper case
letter.
------------------------------------------------------------------------
b.__add__(22) gives a warning                           - Good
b.__radd__(22) crashes W95 OSR2                      - Very Bad

cjw
msg5718 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-07-31 13:07
Logged In: YES 
user_id=6380

The first result is how it's supposed to be!  list() returns a list.  I don't know why you expected the type 
comparison not to return 1.

The __radd__ crash is a bug that I'll fix -- Thanks for reporting!
msg5719 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-07-31 16:53
Logged In: YES 
user_id=6380

I've checked in a fix to the __radd__ problem.
The solution is to not support __radd__ for sequences,
since the sq_concat slot really only dispatches on the first arg.

Closing this bug now.
History
Date User Action Args
2022-04-10 16:04:16adminsetgithub: 34870
2001-07-31 12:51:12cjwhrhcreate