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: UserList/UserString: Do creation of new instance in new func
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: effbot Nosy List: effbot, twouters
Priority: normal Keywords: patch

Created on 2000-07-04 18:52 by twouters, last changed 2022-04-10 16:02 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
None twouters, 2000-07-04 18:52 None
Messages (5)
msg33034 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2000-07-04 18:52
 
msg33035 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2000-07-04 18:55
This patch moves the creation of a new instance (such as slicing and adding/multiplying requires) into a new function, so it can be more easily overridden in derived classes.

The name of the new function is completely arbitrary, if there is some convention on naming these things, please tell me ;)
msg33036 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2000-07-07 12:47
When put like that, agreed. Where's the 'nuke this patch' button again ? :-)
msg33037 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2000-07-07 12:44
-0: I'm a bit sceptical.  I think the User types are best seen as subclassable versions of the built-in types, not list/string/dict-like container classes. When types and classes are merged, these should disappear (i.e. UserList = classof([])).

In other words, we shouldn't add stuff to the User classes that we don't want in the core implementation.
msg33038 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2000-07-07 12:46
I meant UserList = [].__class__, of course...
History
Date User Action Args
2022-04-10 16:02:03adminsetgithub: 32516
2000-07-04 18:52:32twouterscreate