- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
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.
Created on 2008-09-02 19:22 by _doublep, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (5) | ||
|---|---|---|
| msg72362 - (view) | Author: Paul Pogonyshev (_doublep) | Date: 2008-09-02 19:22 |
PEP 3121 at python.org mentions PyType_Copy(). However, it doesn't seem to be present in SVN version and there is no apparent replacement. Please clarify how types should be created for different module instances --- if just sharing is fine, or should some copying (which function?) be used. |
||
| msg72749 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2008-09-07 19:28 |
The intention is that different interpreters have distinct, separate instances of the type objects. This is desirable in case of class variables, and standard for Python-defined types. Clearly, 3.0 won't provide that separation for many of the builtin types (and never may); for out-of-core types, it is really the choice of the module designer. I forgot to implement PyType_Copy; it is meant to create a new type object which is a field-by-field copy. It's now too late to add it to 3.0; extension authors requiring it now should include it's source code (which is currently not even written - contributions are welcome). Reconsidering it: what should it do to the base types? a) just incref tp_base and clone tp_bases, b) offer an optional parameter to specify an alternative base object, c) offer an optional parameter to specify an alternative bases tuple. |
||
| msg379368 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2020-10-22 21:50 |
12 years later there still is no PyType_Copy, at least not by that name, according to the doc index. So it is either not urgently needed or the need has been covered by other additions. I think that this should be closed as out of date and any new additions should be done in the light of the current situation. |
||
| msg379372 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2020-10-22 22:08 |
Zach Ware agreed on a coredev sprint discussion. |
||
| msg379463 - (view) | Author: Petr Viktorin (petr.viktorin) * ![]() |
Date: 2020-10-23 18:27 |
The need is covered by PEP 384's PyType_FromSpec (and later additions, the latest being PyType_FromModuleAndSpec). Thanks for closing! |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:38 | admin | set | github: 48010 |
| 2020-10-23 18:27:24 | petr.viktorin | set | nosy:
+ petr.viktorin messages: + msg379463 |
| 2020-10-22 22:08:10 | terry.reedy | set | status: open -> closed resolution: out of date messages: + msg379372 stage: resolved |
| 2020-10-22 21:50:39 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg379368 |
| 2012-08-27 03:25:24 | belopolsky | set | nosy:
+ belopolsky |
| 2009-02-15 15:05:59 | pitrou | set | nosy: + pitrou, benjamin.peterson |
| 2008-09-07 19:28:35 | loewis | set | priority: high -> normal messages: + msg72749 |
| 2008-09-02 21:51:46 | benjamin.peterson | set | priority: high assignee: loewis nosy: + loewis |
| 2008-09-02 19:22:23 | _doublep | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements

