|
Re: Re: accessing the python type system: msg#00311python.c++
David Abrahams wrote: What about a 'type object' similar to 'type_info', i.e. with but 'isinstance' requires a type object to be passed, whether 'name()' would permit to query that (or a 'stringified form' of it) from the object in question. In principle, there's no reason we shouldn't have something like you that's precisely what I have in mind. ...but once you start go go down that road you get in trouble. Python Sorry, I don't understand that. the Python C Api provides 'type objects', so ultimately I would arrive at a single root of that 'instance' <-> 'type' tree, i.e. the top node is a unique type (a 'type type', actually). If I can't copy it there should be a (possibly hidden) global instance (singleton ?) that is referenced each time I access it, or else I make copies of it. In any case the key is to define what 'equal' or 'identity' means. When copies of an object are not equivalent yeah, so we need a well defined concept of comparison. I guess 'type' would have to be an instance of a class derived from agreed. I would be a concenience only. Regards, Stefan |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: accessing the python type system: 00311, David Abrahams |
|---|---|
| Next by Date: | Re: Re: registering simple conversions from/to python: 00311, Ralf W. Grosse-Kunstleve |
| Previous by Thread: | Re: accessing the python type systemi: 00311, David Abrahams |
| Next by Thread: | Re: accessing the python type system: 00311, David Abrahams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |