Message48531
| Author |
gregcouch |
| Recipients |
| Date |
2005年07月15日.07:26:14 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=131838
One reason that the type wasn't a heap type was because I
didn't find an example in the Python documentation. And
because when I was looking through typeobject.c, I saw code,
like type_get_doc(), that ignores the (tp_doc) slot when it
is a heap type -- exactly what I don't want (looking closer,
it may be the only one). I also like most of the
restrictions a non-heap type has, like being unable to
change its name. So if heap types are as fast as non-heap
types, then I have no objection to switching. I'm also
concerned about the additional startup time switching to
heap types would cost since I currently have 75 types in my
module.
The python code that prompted this patch was code that
reached in and added extra keyword arguments to a method,
sort of like a decorator, for additional bookkeeping.
Subclassing is out because the C (C++) object factory
function only returns the instances of the original type. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:43:24 | admin | link | issue1229239 messages |
| 2007年08月23日 15:43:24 | admin | create |
|