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年03月18日 21:09 by benjamin.peterson, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| expose_cell.patch | benjamin.peterson, 2008年03月18日 21:09 | exposes cell objects | ||
| expose_cell_python.patch | benjamin.peterson, 2008年03月18日 22:30 | better implementation | ||
| types_in_python.diff | benjamin.peterson, 2008年03月18日 22:43 | makes the types module use python only | ||
| Messages (7) | |||
|---|---|---|---|
| msg63988 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年03月18日 21:09 | |
types currently exposes all types used by the interpreter except cell objects. This patch adds support for that and adds to the docs. I couldn't find a way to access the cell type through Python, so I added it to the _types module. |
|||
| msg64001 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年03月18日 22:23 | |
The following python code retrieves the cell type, and could be added to types.py: def _f(x=None): def g(): x return g CellType = type(_f().func_closure[0]) OTOH, you are unlikely to need it. Do you have a use case, or is it just to have the full list of types? |
|||
| msg64003 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年03月18日 22:29 | |
While I'm at it, the _types module could be removed, because its exports can easily be replaced by: GetSetDescriptorType = type(Exception.args) MemberDescriptorType = type(EnvironmentError.errno) |
|||
| msg64004 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年03月18日 22:30 | |
I've attached a patch which uses the Amaury's implementation. >OTOH, you are unlikely to need it. Do you have a use case, or is it just >to have the full list of types? Mostly, I want a full list of types. |
|||
| msg64007 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年03月18日 22:43 | |
Okay, I removed the _types module in favor of your Python implementation. Here's the patch. |
|||
| msg64252 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2008年03月21日 18:29 | |
Please have a look at patch #1605, too. It implements a semi autogenerated _types module which exposes all types in from Include/*.h |
|||
| msg65221 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2008年04月08日 22:09 | |
Committed r62231: remove _types module. I did not add CellType though, because of discussion in #1605. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:32 | admin | set | github: 46660 |
| 2008年04月08日 22:09:42 | amaury.forgeotdarc | set | status: open -> closed resolution: accepted messages: + msg65221 |
| 2008年03月21日 18:29:51 | christian.heimes | set | nosy:
+ christian.heimes messages: + msg64252 |
| 2008年03月18日 22:43:18 | benjamin.peterson | set | files:
+ types_in_python.diff messages: + msg64007 title: types should expose cell object -> types module can be implemented only in Python |
| 2008年03月18日 22:30:22 | benjamin.peterson | set | files:
+ expose_cell_python.patch messages: + msg64004 |
| 2008年03月18日 22:29:40 | amaury.forgeotdarc | set | messages: + msg64003 |
| 2008年03月18日 22:23:49 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg64001 |
| 2008年03月18日 21:09:29 | benjamin.peterson | create | |